You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
2.0 KiB
73 lines
2.0 KiB
5 years ago
|
<template>
|
||
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||
|
<el-menu
|
||
|
:default-active="$route.path"
|
||
|
:collapse="isCollapse"
|
||
|
:background-color="variables.menuBg"
|
||
|
:text-color="variables.menuText2"
|
||
|
:active-text-color="variables.menuActiveText2"
|
||
|
:collapse-transition="false"
|
||
|
mode="vertical"
|
||
|
>
|
||
|
<sidebar-item :routes="routes"></sidebar-item>
|
||
|
</el-menu>
|
||
|
</el-scrollbar>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import {mapGetters} from 'vuex';
|
||
|
import variables from '../../../../../public/template/001/styles/variables.scss';
|
||
|
import SidebarItem from './SidebarItem';
|
||
|
|
||
|
export default {
|
||
|
components: {SidebarItem},
|
||
|
computed: {
|
||
|
...mapGetters([
|
||
|
'sidebar',
|
||
|
'router',
|
||
|
'activeIndex'
|
||
|
]),
|
||
|
variables() {
|
||
|
return variables;
|
||
|
},
|
||
|
// routes() {
|
||
|
// return this.$router.options.routes[2].children
|
||
|
// },
|
||
|
isCollapse() {
|
||
|
return !this.sidebar.opened;
|
||
|
},
|
||
|
},
|
||
|
data(){
|
||
|
return {
|
||
|
routes:[
|
||
|
{
|
||
|
path: 'menu',
|
||
|
name: 'menuManage',
|
||
|
meta: {title: '菜单管理', icon: 'table', noCache: true},
|
||
|
},
|
||
|
{
|
||
|
path: 'user',
|
||
|
name: 'userManage',
|
||
|
meta: {title: '用户管理', icon: 'dashboard', noCache: true},
|
||
|
},
|
||
|
{
|
||
|
path: 'role',
|
||
|
name: 'roleManage',
|
||
|
meta: {title: '角色管理', icon: 'eye', noCache: true},
|
||
|
},
|
||
|
{
|
||
|
path: 'permission',
|
||
|
name: 'permissionManage',
|
||
|
meta: {title: '权限管理', icon: 'form', noCache: true},
|
||
|
},
|
||
|
{
|
||
|
path: 'notice',
|
||
|
name: 'noticeManage',
|
||
|
meta: {title: '公告管理', icon: 'jiaoliu', noCache: true},
|
||
|
}
|
||
|
],
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
</script>
|