Skip to content

Commit e478da7

Browse files
authored
Change color picker to fix color change/selection updating (#332)
Update vue n-color-picker static :value to v-model:value so that it updates and use the debounced inputColor (as opposed to wheelColor) for template
1 parent 03bb1e5 commit e478da7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/tools/color-wheel/color-wheel.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ watch(
9191
<template>
9292
<div>
9393
<c-card :title="t('tools.color-wheel.texts.title-pick-a-color')" mb-2>
94-
<n-color-picker :value="wheelColor" :show-alpha="false" />
94+
<n-color-picker v-model:value="inputColor" :show-alpha="false" />
9595
<div
96-
:style="{ backgroundColor: wheelColor }"
96+
:style="{ backgroundColor: inputColor }"
9797
/>
9898
</c-card>
9999

@@ -112,11 +112,11 @@ watch(
112112
<c-card :title="t('tools.color-wheel.texts.title-wheel')" mb-2 style="text-align: center">
113113
<div style="display: inline-block">
114114
<VueColorWheel
115-
v-model:color="wheelColor"
115+
v-model:color="inputColor"
116116
wheel="aurora"
117117
:harmony="currentType"
118118
:radius="160"
119-
:default-color="wheelColor"
119+
:default-color="inputColor"
120120
:show-brightness="false"
121121
@change="handleChangeColors"
122122
/>

0 commit comments

Comments
 (0)