区分环境进行按需加载,提升本地开发加载速度。
更改侧边栏活跃色,让其和element-ui皮肤统一。 修复issue https://github.com/flipped-aurora/gin-vue-admin/issues/1347
This commit is contained in:
@@ -15,7 +15,7 @@ export const useUserStore = defineStore('user', () => {
|
||||
headerImg: '',
|
||||
authority: {},
|
||||
sideMode: 'dark',
|
||||
activeColor: '#4D70FF',
|
||||
activeColor: 'var(--el-color-primary)',
|
||||
baseColor: '#fff'
|
||||
})
|
||||
const token = ref(window.localStorage.getItem('token') || '')
|
||||
@@ -123,10 +123,7 @@ export const useUserStore = defineStore('user', () => {
|
||||
}
|
||||
})
|
||||
const activeColor = computed(() => {
|
||||
if (userInfo.value.sideMode === 'dark' || userInfo.value.sideMode === 'light') {
|
||||
return '#4D70FF'
|
||||
}
|
||||
return userInfo.activeColor
|
||||
return 'var(--el-color-primary)'
|
||||
})
|
||||
|
||||
watch(() => token.value, () => {
|
||||
|
||||
Reference in New Issue
Block a user