From c5675caab8392bfafd217d06529c2547edaa6aa8 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 25 九月 2025 14:46:01 +0800
Subject: [PATCH] 最新版本541200007

---
 admin/src/store/index.js |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/admin/src/store/index.js b/admin/src/store/index.js
index 6825b73..f76eee9 100644
--- a/admin/src/store/index.js
+++ b/admin/src/store/index.js
@@ -16,6 +16,8 @@
     // 鏄惁鏀惰捣
     collapse: false
   },
+  topMenuCurrent: {
+  },
   topMenuList: {
     // 鑿滃崟鍒楄〃
     list: [],
@@ -56,8 +58,22 @@
   setHomePage (state, homePage) {
     state.homePage = homePage
   },
+  // 璁剧疆棣栭〉璺敱淇℃伅
+  setTopMenuCurrent (state, current) {
+    console.log("setTopMenuCurrent",current)
+    if(current.id !== state.topMenuCurrent.id){
+      state.topMenuList.list.forEach(item => {
+        console.log(item.id, item.id)
+        if (current.id == item.id) {
+          state.topMenuCurrent = current
+          state.menuData.list = item.children
+        }
+      })
+    }
+  },
   // 閲嶇疆鑿滃崟
   resetMenus: (state) => {
+    state.topMenuId=null;
     state.menuData.list = []
   },
   //  tags

--
Gitblit v1.9.3