ColorPicker support value null

This commit is contained in:
梁灏 2021-09-15 17:15:36 +08:00
parent c9a33a082c
commit c191f14737

View file

@ -242,8 +242,8 @@ export default {
data() {
return {
val: changeColor(this.value),
currentValue: this.value,
val: changeColor(this.value || ''),
currentValue: this.value || '',
dragging: false,
visible: false,
recommendedColor: [
@ -412,7 +412,7 @@ export default {
this.val = changeColor(newVal);
},
visible(val) {
this.val = changeColor(this.value);
this.val = changeColor(this.value || '');
this.$refs.drop[val ? 'update' : 'destroy']();
this.$emit('on-open-change', Boolean(val));
},