Fix color interface not showing value on load

Fixes #428
This commit is contained in:
rijkvanzanten
2020-09-29 10:45:06 -04:00
parent 193a9b0307
commit 5092b4902a

View File

@@ -148,7 +148,7 @@ export default defineComponent({
(htmlColorInput.value?.$el as HTMLElement).getElementsByTagName('input')[0].click();
}
const isValidColor = computed<boolean>(() => rgb.value != null);
const isValidColor = computed<boolean>(() => rgb.value !== null);
const { hsl, rgb, hex } = useColor();
@@ -199,7 +199,8 @@ export default defineComponent({
const newColor = Color(newValue);
if (newColor === null || newColor === _rgb.value) return;
_rgb.value = newColor;
}
},
{ immediate: true }
);
const rgb = computed<number[]>({