|
|
@ -1,12 +1,12 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<a-layout-sider :class="['sider', isMobile ? null : 'shadow']" width="256px" :collapsible="collapsible" v-model="collapsed" :trigger="null"> |
|
|
|
<a-layout-sider :class="[theme, 'sider', isMobile ? null : 'shadow']" width="256px" :collapsible="collapsible" v-model="collapsed" :trigger="null"> |
|
|
|
<div class="logo"> |
|
|
|
<div :class="['logo', theme]"> |
|
|
|
<router-link to="/dashboard/workplace"> |
|
|
|
<router-link to="/dashboard/workplace"> |
|
|
|
<img src="static/img/vue-antd-logo.png"> |
|
|
|
<img src="static/img/vue-antd-logo.png"> |
|
|
|
<h1>Vue Antd Admin</h1> |
|
|
|
<h1>Vue Antd Admin</h1> |
|
|
|
</router-link> |
|
|
|
</router-link> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<i-menu :collapsed="collapsed" :menuData="menuData" @select="onSelect"/> |
|
|
|
<i-menu :theme="theme" :collapsed="collapsed" :menuData="menuData" @select="onSelect"/> |
|
|
|
</a-layout-sider> |
|
|
|
</a-layout-sider> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
@ -30,6 +30,11 @@ export default { |
|
|
|
menuData: { |
|
|
|
menuData: { |
|
|
|
type: Array, |
|
|
|
type: Array, |
|
|
|
required: true |
|
|
|
required: true |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
theme: { |
|
|
|
|
|
|
|
type: String, |
|
|
|
|
|
|
|
required: false, |
|
|
|
|
|
|
|
default: 'dark' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
@ -46,11 +51,23 @@ export default { |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped> |
|
|
|
<style lang="less" scoped> |
|
|
|
|
|
|
|
.dark{ |
|
|
|
|
|
|
|
background-color: #002140; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.light{ |
|
|
|
|
|
|
|
background-color: #fff; |
|
|
|
|
|
|
|
} |
|
|
|
.shadow{ |
|
|
|
.shadow{ |
|
|
|
box-shadow: 2px 0 6px rgba(0,21,41,.35); |
|
|
|
box-shadow: 2px 0 6px rgba(0,21,41,.35); |
|
|
|
} |
|
|
|
} |
|
|
|
.sider{ |
|
|
|
.sider{ |
|
|
|
z-index: 10; |
|
|
|
z-index: 10; |
|
|
|
|
|
|
|
&.light{ |
|
|
|
|
|
|
|
background-color: #fff; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&.dark{ |
|
|
|
|
|
|
|
background-color: #001529; |
|
|
|
|
|
|
|
} |
|
|
|
.logo{ |
|
|
|
.logo{ |
|
|
|
height: 64px; |
|
|
|
height: 64px; |
|
|
|
position: relative; |
|
|
|
position: relative; |
|
|
@ -58,8 +75,19 @@ export default { |
|
|
|
padding-left: 24px; |
|
|
|
padding-left: 24px; |
|
|
|
-webkit-transition: all .3s; |
|
|
|
-webkit-transition: all .3s; |
|
|
|
transition: all .3s; |
|
|
|
transition: all .3s; |
|
|
|
background: #002140; |
|
|
|
|
|
|
|
overflow: hidden; |
|
|
|
overflow: hidden; |
|
|
|
|
|
|
|
&.light{ |
|
|
|
|
|
|
|
background-color: #fff; |
|
|
|
|
|
|
|
h1{ |
|
|
|
|
|
|
|
color: #1890ff; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&.dark{ |
|
|
|
|
|
|
|
background-color: #002140; |
|
|
|
|
|
|
|
h1{ |
|
|
|
|
|
|
|
color: #fff; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
h1{ |
|
|
|
h1{ |
|
|
|
color: #fff; |
|
|
|
color: #fff; |
|
|
|
font-size: 20px; |
|
|
|
font-size: 20px; |
|
|
|