fix: 主题色修改
This commit is contained in:
parent
41cfc77a3e
commit
4243cfdf7b
|
@ -62,6 +62,7 @@ export default {
|
|||
this.$get('/system/theme', res => {
|
||||
this.color = res.data ? res.data : ORIGIN_COLOR;
|
||||
setColor(this.color, this.color, this.color, this.color);
|
||||
this.$store.commit('setTheme', res.data);
|
||||
})
|
||||
}
|
||||
if (localStorage.getItem("store")) {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div>
|
||||
<template>
|
||||
<span>{{ $t('commons.operating') }}
|
||||
<i class='el-icon-setting' style="color:#7834c1; margin-left:10px" @click="customHeader"> </i>
|
||||
<i class='el-icon-setting operator-color' @click="customHeader"> </i>
|
||||
</span>
|
||||
</template>
|
||||
</div>
|
||||
|
@ -21,5 +21,8 @@ export default {
|
|||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.operator-color {
|
||||
color: var(--count_number);
|
||||
margin-left:10px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -169,7 +169,7 @@ export default {
|
|||
type: 'bar',
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: COUNT_NUMBER
|
||||
color: this.$store.state.theme.theme ? this.$store.state.theme.theme : COUNT_NUMBER
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -179,7 +179,7 @@ export default {
|
|||
type: 'bar',
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: COUNT_NUMBER_SHALLOW
|
||||
color: this.$store.state.theme.theme ? this.$store.state.theme.theme : COUNT_NUMBER_SHALLOW
|
||||
}
|
||||
}
|
||||
}]
|
||||
|
|
|
@ -50,11 +50,23 @@ const IsReadOnly = {
|
|||
}
|
||||
}
|
||||
|
||||
const Theme = {
|
||||
state: {
|
||||
theme: undefined
|
||||
},
|
||||
mutations: {
|
||||
setTheme(state, value) {
|
||||
state.theme = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default new Vuex.Store({
|
||||
modules: {
|
||||
api: API,
|
||||
common: Common,
|
||||
switch: Switch,
|
||||
isReadOnly: IsReadOnly,
|
||||
theme: Theme
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue