diff --git a/web/src/store/module/user.js b/web/src/store/module/user.js index 5534959b10b737662ad27d191d2000fd40c57bc9..82ee944bf02b5373925320b035052688545f1acb 100644 --- a/web/src/store/module/user.js +++ b/web/src/store/module/user.js @@ -118,13 +118,31 @@ export const user = { token(state) { return state.token }, - sideMode(state) { + mode(state) { return state.userInfo.sideMode }, + sideMode(state) { + if (state.userInfo.sideMode === 'dark') { + return '#191a23' + } else if (state.userInfo.sideMode === 'light') { + return '#fff' + } else { + return state.userInfo.sideMode + } + }, baseColor(state) { - return state.userInfo.baseColor + if (state.userInfo.sideMode === 'dark') { + return '#fff' + } else if (state.userInfo.sideMode === 'light') { + return '#191a23' + } else { + return state.userInfo.baseColor + } }, activeColor(state) { + if (state.userInfo.sideMode === 'dark' || state.userInfo.sideMode === 'light') { + return '#1890ff' + } return state.userInfo.activeColor } diff --git a/web/src/view/layout/aside/historyComponent/history.vue b/web/src/view/layout/aside/historyComponent/history.vue index d54ffcb19fab917df470bbfdb97f47635c1d57c0..8568b67d01c11ce58fff76fc9209dfd6e4d46939 100644 --- a/web/src/view/layout/aside/historyComponent/history.vue +++ b/web/src/view/layout/aside/historyComponent/history.vue @@ -16,7 +16,7 @@ :tab="item" class="gva-tab" > - {{ item.meta.title }} + {{ item.meta.title }} diff --git a/web/src/view/layout/aside/index.vue b/web/src/view/layout/aside/index.vue index 0d264b81895c1e692996d3a7b1403fa87ed9322b..3a705ac9f2eb75e3642864773dd7ecca8b53c1ae 100644 --- a/web/src/view/layout/aside/index.vue +++ b/web/src/view/layout/aside/index.vue @@ -6,9 +6,9 @@ :collapse="isCollapse" :collapse-transition="true" :default-active="active" - :background-color="backgroundColor" + :background-color="sideMode" :active-text-color="activeColor" - :text-color="textColor" + :text-color="baseColor" class="el-menu-vertical" unique-opened @select="selectMenuItem" @@ -38,25 +38,7 @@ export default { }, computed: { ...mapGetters('router', ['asyncRouters']), - ...mapGetters('user', ['baseColor', 'activeColor', 'sideMode']), - backgroundColor() { - if (this.sideMode === 'dark') { - return '#191a23' - } else if (this.sideMode === 'light') { - return '#fff' - } else { - return this.sideMode - } - }, - textColor() { - if (this.$store.getters['user/sideMode'] === 'dark') { - return '#fff' - } else if (this.$store.getters['user/sideMode'] === 'light') { - return '#191a23' - } else { - return this.baseColor - } - } + ...mapGetters('user', ['baseColor', 'activeColor', 'sideMode']) }, watch: { $route() { diff --git a/web/src/view/layout/setting/index.vue b/web/src/view/layout/setting/index.vue index 7c637e4587bf049400d98cc1eb46ae0c1ba5c367..a6f51652b0f6627774c9b143ef681d276edb7a43 100644 --- a/web/src/view/layout/setting/index.vue +++ b/web/src/view/layout/setting/index.vue @@ -9,15 +9,15 @@ >