mirror of
https://github.com/iczer/vue-antd-admin.git
synced 2025-08-19 19:00:03 +08:00
修复:切换色弱模式时,主题颜色重置问题;
This commit is contained in:
parent
9baf57f4ee
commit
24f23bc9b3
@ -7,7 +7,7 @@
|
|||||||
</img-checkbox-group>
|
</img-checkbox-group>
|
||||||
</setting-item>
|
</setting-item>
|
||||||
<setting-item title="主题色">
|
<setting-item title="主题色">
|
||||||
<color-checkbox-group @change="onColorChange" :defaultValues="[5]" :multiple="false">
|
<color-checkbox-group @change="onColorChange" :defaultValues="themeColorIndex" :multiple="false">
|
||||||
<color-checkbox v-for="(color, index) in colors" :key="index" :color="color" :value="index" />
|
<color-checkbox v-for="(color, index) in colors" :key="index" :color="color" :value="index" />
|
||||||
</color-checkbox-group>
|
</color-checkbox-group>
|
||||||
</setting-item>
|
</setting-item>
|
||||||
@ -93,7 +93,7 @@ import { mapState } from 'vuex'
|
|||||||
|
|
||||||
const ColorCheckboxGroup = ColorCheckbox.Group
|
const ColorCheckboxGroup = ColorCheckbox.Group
|
||||||
const ImgCheckboxGroup = ImgCheckbox.Group
|
const ImgCheckboxGroup = ImgCheckbox.Group
|
||||||
|
const colors = ['#f5222d', '#fa541c', '#faad14', '#13c2c2', '#52c41a', '#1890ff', '#2f54eb', '#722ed1']
|
||||||
export default {
|
export default {
|
||||||
name: 'Setting',
|
name: 'Setting',
|
||||||
components: {ImgCheckboxGroup, ImgCheckbox, ColorCheckboxGroup, ColorCheckbox, SettingItem},
|
components: {ImgCheckboxGroup, ImgCheckbox, ColorCheckboxGroup, ColorCheckbox, SettingItem},
|
||||||
@ -101,7 +101,8 @@ export default {
|
|||||||
return {
|
return {
|
||||||
animate: this.$store.state.setting.animate.name,
|
animate: this.$store.state.setting.animate.name,
|
||||||
direction: this.$store.state.setting.animate.direction,
|
direction: this.$store.state.setting.animate.direction,
|
||||||
colors: ['#f5222d', '#fa541c', '#faad14', '#13c2c2', '#52c41a', '#1d92ff', '#2f54eb', '#722ed1'],
|
themeColorIndex: [colors.indexOf(this.$store.state.setting.themeColor)],
|
||||||
|
colors,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user