From 41fc3d69e920ca286591352f7f6d03ccaad1e794 Mon Sep 17 00:00:00 2001 From: rk <94314517@qq.com> Date: 星期五, 26 九月 2025 15:42:46 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/wuhuyancao' into wuhuyancao --- 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