77
88import type { UnwrapRef } from "vue"
99
10- import { ElMessageBox , ElOption , ElSelect , ElSwitch } from "element-plus"
10+ import { ElColorPicker , ElMessageBox , ElOption , ElSelect , ElSwitch } from "element-plus"
1111import { defineComponent , reactive , unref , watch } from "vue"
1212import optionService from "@service/option-service"
1313import { defaultAppearance } from "@util/constant/option"
@@ -26,6 +26,7 @@ const allLocaleOptions: timer.option.LocaleOption[] = ["default", ...SORTED_LOCA
2626function copy ( target : timer . option . AppearanceOption , source : timer . option . AppearanceOption ) {
2727 target . displayWhitelistMenu = source . displayWhitelistMenu
2828 target . displayBadgeText = source . displayBadgeText
29+ target . badgeBgColor = source . badgeBgColor
2930 target . locale = source . locale
3031 target . printInConsole = source . printInConsole
3132 target . darkMode = source . darkMode
@@ -119,6 +120,16 @@ const _default = defineComponent((_props, ctx) => {
119120 onChange = { ( val : boolean ) => option . displayBadgeText = val }
120121 />
121122 </ OptionItem >
123+ < OptionItem
124+ v-show = { option . displayBadgeText }
125+ label = { msg => msg . option . appearance . badgeBgColor }
126+ >
127+ < ElColorPicker
128+ size = "small"
129+ modelValue = { option . badgeBgColor }
130+ onChange = { val => option . badgeBgColor = val }
131+ />
132+ </ OptionItem >
122133 < OptionItem
123134 label = { msg => msg . option . appearance . printInConsole . label }
124135 defaultValue = { t ( msg => msg . option . yes ) }
0 commit comments