主题色功能bug修复

This commit is contained in:
pixel
2021-06-29 15:28:39 +08:00
parent 4a39a2f81c
commit df75dae39d
4 changed files with 28 additions and 28 deletions
@@ -16,7 +16,7 @@
:tab="item"
class="gva-tab"
>
<span slot="label" :style="{color: activeColor}"><i class="dot" :style="{backgroundColor:activeValue===name(item)?activeColor:'#ddd'}" /> {{ item.meta.title }}</span>
<span slot="label" :style="{color: activeValue===name(item)?activeColor:'#333'}"><i class="dot" :style="{backgroundColor:activeValue===name(item)?activeColor:'#ddd'}" /> {{ item.meta.title }}</span>
</el-tab-pane>
</el-tabs>
+3 -21
View File
@@ -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() {