From 9ab109b9ee96e7ff2bf2b935a044aee5842a3ddc Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期日, 28 九月 2025 10:08:09 +0800
Subject: [PATCH] 最新版本541200007
---
admin/src/store/index.js | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/admin/src/store/index.js b/admin/src/store/index.js
index 4af82fa..eae17b4 100644
--- a/admin/src/store/index.js
+++ b/admin/src/store/index.js
@@ -1,5 +1,6 @@
import Vue from 'vue'
import Vuex from 'vuex'
+import router from '../router'
Vue.use(Vuex)
const state = {
@@ -11,6 +12,14 @@
homePage: null,
// 鑿滃崟
menuData: {
+ // 鑿滃崟鍒楄〃
+ list: [],
+ // 鏄惁鏀惰捣
+ collapse: false
+ },
+ topMenuCurrent: {
+ },
+ topMenuList: {
// 鑿滃崟鍒楄〃
list: [],
// 鏄惁鏀惰捣
@@ -50,8 +59,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