From e14264130d54c85706e063ddf6b090b5c2dd4edc Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期五, 30 一月 2026 09:48:06 +0800
Subject: [PATCH] 最新版本541200007
---
admin/src/store/index.js | 33 ++-------------------------------
1 files changed, 2 insertions(+), 31 deletions(-)
diff --git a/admin/src/store/index.js b/admin/src/store/index.js
index f2fb2f1..6825b73 100644
--- a/admin/src/store/index.js
+++ b/admin/src/store/index.js
@@ -1,13 +1,11 @@
import Vue from 'vue'
import Vuex from 'vuex'
-import router from '../router'
Vue.use(Vuex)
const state = {
// 鐧诲綍鐢ㄦ埛淇℃伅
userInfo: null,
tableHeightNew: 300,
- sysConfig: { title: '', subtitle: '' },
primaryColor: '#2080f7',
// 棣栭〉
homePage: null,
@@ -18,8 +16,6 @@
// 鏄惁鏀惰捣
collapse: false
},
- topMenuCurrent: {
- },
topMenuList: {
// 鑿滃崟鍒楄〃
list: [],
@@ -29,21 +25,10 @@
// tags鏁扮粍
tags: [],
// tagsview鏍囩鏄剧ず闅愯棌
- isCollapse: false,
- // 椤堕儴鑿滃崟绱㈠紩
- currentIndex: 0
+ isCollapse: false
}
const mutations = {
- // 璁剧疆椤堕儴鑿滃崟绱㈠紩
- setCurrentIndex (state, index) {
- console.log('璁剧疆椤堕儴鑿滃崟绱㈠紩', index)
- state.currentIndex = index
- },
- setSysconfig (state, config) {
- state.sysConfig = { title: config.title || '', subtitle: config.subtitle || '' }
- document.title = state.sysConfig.title+ state.sysConfig.subtitle
- },
// 鍒囨崲鑿滃崟鐘舵��
switchCollapseMenu (state, value) {
if (value != null) {
@@ -71,22 +56,8 @@
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
@@ -95,7 +66,7 @@
// findindex鎵捐鏍囷紝寰幆鍒ゆ柇涓�涓嬶紝濡傛灉绛変簬閭d箞灏变唬琛ㄦ湁鐩稿悓鐨勶紝灏变笉蹇呮坊鍔狅紝濡傛灉鎵句笉鍒伴偅灏辨槸-1.灏辨坊鍔�
// state.tags = [{ ...val, keepAlive: false }]
const result = state.tags.findIndex(item => item.index === val.index)
- if (result === -1) {
+ if (result === -1) {
state.tags.push({ ...val, keepAlive: false })
} else {
state.tags[result] = { ...val, keepAlive: false }
--
Gitblit v1.9.3