src/layout/components/Sidebar/index.vue
@@ -39,6 +39,7 @@ import SidebarItem from './SidebarItem' import variables from '@/styles/variables.scss' import { LoginMenu } from '@/api/user' import { setCookie } from '@/utils/auth' export default { components: { SidebarItem, Logo }, @@ -59,6 +60,7 @@ const route = this.$route const { meta, path } = route // if set path, the sidebar will highlight the path you set setCookie('ruleCode', meta.code)// 将编码规则code存到cookie里面 if (meta.activeMenu) { return meta.activeMenu }