From 3fce634eeb56f9425d5e745b1d4333da962fc3d7 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 25 八月 2023 11:19:10 +0800
Subject: [PATCH] 1.新增功能菜单

---
 src/layout/components/Sidebar/index.vue |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue
index 2e7e9ee..890bc5f 100644
--- a/src/layout/components/Sidebar/index.vue
+++ b/src/layout/components/Sidebar/index.vue
@@ -57,6 +57,7 @@
 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 },
@@ -76,10 +77,16 @@
     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)// 灏嗙紪鐮佽鍒檆ode瀛樺埌cookie閲岄潰
+      setCookie('ruleCode', meta.code) // 灏嗙紪鐮佽鍒檆ode瀛樺埌cookie閲岄潰
+
+      removeCookie('datacode')
+      setCookie('datacode', meta.datacode) // 鏁版嵁鏉冮檺
+
+      Vue.prototype.$buttoncode = meta.buttoncode // 鎸夐挳鏉冮檺
+
       if (meta.activeMenu) {
         return meta.activeMenu
       }

--
Gitblit v1.9.3