Skip to content

Commit 2bc3b40

Browse files
Update to emit when value is updated
1 parent c95cc86 commit 2bc3b40

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/plugin/VColorField.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ function updateModelValue(value: any) {
506506
507507
if (returnColor.length < 7) {
508508
modelValue.value = returnColor;
509+
updateModelValues(returnColor);
509510
return;
510511
}
511512
@@ -522,8 +523,11 @@ function updateModelValue(value: any) {
522523
updateModelValues(returnColor);
523524
}
524525
525-
function updateModelValues(val: any) {
526-
colorPickerModelValue.value = val;
526+
function updateModelValues(val: any, updatePicker = true) {
527+
if (updatePicker) {
528+
colorPickerModelValue.value = val;
529+
}
530+
527531
modelValue.value = val;
528532
emit('update:modelValue', val);
529533
emit('update', val);

0 commit comments

Comments
 (0)