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.
87 lines
2.5 KiB
87 lines
2.5 KiB
<template>
|
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
|
<el-menu
|
|
:default-active="$route.name"
|
|
: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: 'company',
|
|
name: 'companyManage',
|
|
meta: {title: '公司管理', icon: 'tree', noCache: true},
|
|
},
|
|
{
|
|
path: 'user',
|
|
name: 'userManage',
|
|
meta: {title: '用户管理', icon: 'user', 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},
|
|
},
|
|
{
|
|
path: 'meetingManage',
|
|
name: 'meetingManage',
|
|
meta: {title: '会议管理', icon: 'form', noCache: true},
|
|
},
|
|
{
|
|
path: 'attendee',
|
|
name: 'attendee',
|
|
meta: {title: '参会人员', icon: 'user', noCache: true},
|
|
},
|
|
],
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|