| | |
| | | import SidebarItem from './SidebarItem' |
| | | import variables from '@/styles/variables.scss' |
| | | import { removeCookie, setCookie } from '@/utils/auth' |
| | | import Vue from 'vue' |
| | | |
| | | export default { |
| | | components: { SidebarItem, Logo }, |
| | |
| | | activeMenu() { |
| | | const route = this.$route |
| | | const { meta, path } = route |
| | | |
| | | console.log(meta, path, 7) |
| | | // if set path, the sidebar will highlight the path you set |
| | | removeCookie('ruleCode') |
| | | setCookie('ruleCode', meta.code)// 将编码规则code存到cookie里面 |
| | | setCookie('ruleCode', meta.code) // 将编码规则code存到cookie里面 |
| | | |
| | | removeCookie('datacode') |
| | | setCookie('datacode', meta.datacode) // 数据权限 |
| | | |
| | | Vue.prototype.$buttoncode = meta.buttoncode // 按钮权限 |
| | | |
| | | if (meta.activeMenu) { |
| | | return meta.activeMenu |
| | | } |