chore: refactor the code of configuration; 🌟

This commit is contained in:
iczer
2020-07-09 17:42:59 +08:00
parent 44a99a2987
commit b5d17cd63b
17 changed files with 192 additions and 162 deletions

View File

@@ -56,10 +56,10 @@ export default {
computed: {
...mapState('setting', ['theme', 'isMobile', 'layout', 'systemName', 'lang']),
headerTheme () {
if (this.layout == 'side' && this.theme == 'dark' && !this.isMobile) {
if (this.layout == 'side' && this.theme.mode == 'dark' && !this.isMobile) {
return 'light'
}
return this.theme
return this.theme.mode
},
langAlias() {
let lang = this.langList.find(item => item.key == this.lang)