From 3d568c6caa85924093ec5da8cf8ff667dd512f74 Mon Sep 17 00:00:00 2001 From: iczer <1126263215@qq.com> Date: Sat, 20 Jun 2020 11:55:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E:=20=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E8=89=B2=E5=BC=B1=E6=A8=A1=E5=BC=8F=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 21 ++++++++++++++++ src/components/setting/Setting.vue | 7 ++++-- .../transition/PageToggleTransition.vue | 4 +-- src/config/index.js | 11 +++++++- src/layouts/GlobalLayout.vue | 2 +- src/layouts/HeaderNotice.vue | 24 ++++++++++-------- src/layouts/HeaderlAvatar.vue | 25 +++++++++++++------ src/store/modules/setting.js | 19 +++++--------- src/theme/default/index.less | 1 + src/theme/default/style.less | 4 +++ 10 files changed, 80 insertions(+), 38 deletions(-) create mode 100644 src/theme/default/style.less diff --git a/src/App.vue b/src/App.vue index fb66b17..0baf5db 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,6 +6,7 @@ diff --git a/src/components/setting/Setting.vue b/src/components/setting/Setting.vue index d0811bc..33c3331 100644 --- a/src/components/setting/Setting.vue +++ b/src/components/setting/Setting.vue @@ -42,7 +42,7 @@ 色弱模式 - + 显示抽屉按钮 @@ -110,7 +110,7 @@ export default { directions() { return this.animates.find(item => item.name == this.animate).directions }, - ...mapState('setting', ['animates', 'multiPage']) + ...mapState('setting', ['animates', 'multiPage', 'weekMode']) }, methods: { onColorChange (values, colors) { @@ -140,6 +140,9 @@ export default { setMultiPage (checked) { this.$store.commit('setting/setMultiPage', checked) }, + setWeekMode(checked) { + this.$store.commit('setting/setWeekMode', checked) + }, setAnimate() { this.direction = this.directions[0] let animate = { diff --git a/src/components/transition/PageToggleTransition.vue b/src/components/transition/PageToggleTransition.vue index d8bc902..80a2d48 100644 --- a/src/components/transition/PageToggleTransition.vue +++ b/src/components/transition/PageToggleTransition.vue @@ -8,7 +8,7 @@ - diff --git a/src/store/modules/setting.js b/src/store/modules/setting.js index 0d27d7c..7b49731 100644 --- a/src/store/modules/setting.js +++ b/src/store/modules/setting.js @@ -1,20 +1,10 @@ -import {footerLinks, animates, themeColor} from '@/config' +import config from '@/config' export default { namespaced: true, state: { isMobile: false, - theme: 'dark', - themeColor, - layout: 'side', - systemName: 'Vue Antd Admin', - copyright: '2018 ICZER 工作室出品', - footerLinks: footerLinks, - multiPage: true, - animates: animates, - animate: { - name: 'bounce', - direction: 'left' - } + animates: require('@/config/animates'), + ...config }, mutations: { setDevice (state, isMobile) { @@ -34,6 +24,9 @@ export default { }, setThemeColor (state, color) { state.themeColor = color + }, + setWeekMode(state, weekMode) { + state.weekMode = weekMode } } } diff --git a/src/theme/default/index.less b/src/theme/default/index.less index 885594f..2c13c4e 100644 --- a/src/theme/default/index.less +++ b/src/theme/default/index.less @@ -1 +1,2 @@ @import "color"; +@import "style"; diff --git a/src/theme/default/style.less b/src/theme/default/style.less new file mode 100644 index 0000000..ca8dc2b --- /dev/null +++ b/src/theme/default/style.less @@ -0,0 +1,4 @@ +.week-mode{ + overflow: hidden; + filter: invert(80%); +}