Skip to content

Commit d7c6d43

Browse files
committed
Update: handle initial Value is in upper case value
1 parent 9e75139 commit d7c6d43

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/ColorPicker/ColorPicker.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ if (typeof model.value === 'string') {
137137
let colorRgb: RGBAColor;
138138
139139
// Convert from hex to rgba object
140-
if (/#[0-9abcdef]{3,6}/.test(model.value)) {
140+
if (/#[0-9abcdef]{3,6}/.test(model.value?.toLowerCase())) {
141141
colorRgb = { ...hexToRgb(model.value), alpha: 1 };
142142
} else {
143143
// Convert from rgba string to object
@@ -181,6 +181,8 @@ onBeforeUnmount(() => {
181181
const handleHueChange = (hue: number) => {
182182
colorHsb.hue = hue;
183183
184+
console.log(hue, outputColor.value);
185+
184186
model.value = outputColor.value;
185187
emits('change', outputColor.value);
186188
};

0 commit comments

Comments
 (0)