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