添加营销系统模块
This commit is contained in:
63
src/views/layout/components/Sidebar/index.vue
Normal file
63
src/views/layout/components/Sidebar/index.vue
Normal file
@@ -0,0 +1,63 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<div v-show="isShow" class="img-wrapper"><img :src="require('@/assets/img/gaojingLogo.png')"></div>
|
||||
<el-menu
|
||||
:show-timeout="200"
|
||||
:default-active="$route.path"
|
||||
:collapse="isCollapse"
|
||||
mode="vertical"
|
||||
background-color="#304156"
|
||||
text-color="#cccccc"
|
||||
active-text-color="#409EFF"
|
||||
>
|
||||
<sidebar-item v-for="route in permission_routers" :key="route.name" :item="route" :base-path="route.path"/>
|
||||
</el-menu>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import SidebarItem from './SidebarItem'
|
||||
|
||||
export default {
|
||||
components: { SidebarItem },
|
||||
data() {
|
||||
return {
|
||||
isShow: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'permission_routers'
|
||||
]),
|
||||
routes() {
|
||||
return this.$router.options.routes
|
||||
},
|
||||
isCollapse() {
|
||||
this.showLogo()
|
||||
return !this.sidebar.opened
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showLogo() {
|
||||
if (this.sidebar.opened === true) {
|
||||
this.isShow = true
|
||||
} else {
|
||||
this.isShow = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.img-wrapper{
|
||||
img{
|
||||
width: 84px;
|
||||
margin: 20px 60px 20px 60px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user