From 8c6cf205affbbc8ada74f00a7ca25ebca867e9ed Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Mon, 27 Sep 2021 11:44:44 +0800
Subject: [PATCH] 图表颜色
---
src/store/modules/common.js | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/store/modules/common.js b/src/store/modules/common.js
index ec24a59..38bd3a1 100644
--- a/src/store/modules/common.js
+++ b/src/store/modules/common.js
@@ -8,13 +8,13 @@
const common = {
state: {
- language: getStore({name: 'language'}) || 'zh',
- isCollapse: false,
+ language: getStore({ name: 'language' }) || 'zh',
+ isCollapse: true,//默认菜单是否打开
isFullScren: false,
isMenu: true,
isShade: false,
screen: -1,
- isLock: getStore({name: 'isLock'}) || false,
+ isLock: getStore({ name: 'isLock' }) || false,
showTag: true,
showDebug: true,
showCollapse: true,
@@ -24,9 +24,9 @@
showTheme: true,
showMenu: true,
showColor: true,
- colorName: getStore({name: 'colorName'}) || '#409EFF',
- themeName: getStore({name: 'themeName'}) || 'theme-default',
- lockPasswd: getStore({name: 'lockPasswd'}) || '',
+ colorName: getStore({ name: 'colorName' }) || '#409EFF',
+ themeName: getStore({ name: 'themeName' }) || 'theme-bule',
+ lockPasswd: getStore({ name: 'lockPasswd' }) || '',
website: website,
},
mutations: {
@@ -40,8 +40,12 @@
SET_SHADE: (state, active) => {
state.isShade = active;
},
- SET_COLLAPSE: (state) => {
- state.isCollapse = !state.isCollapse;
+ SET_COLLAPSE: (state, val = 3) => {
+ if (val == 3) {
+ state.isCollapse = !state.isCollapse;
+ } else {
+ state.isCollapse = val;
+ }
},
SET_FULLSCREN: (state) => {
state.isFullScren = !state.isFullScren;
--
Gitblit v1.9.3