ColorPicker: fix The predefined color which is checked before clear can not checked after clear

pull/21891/head
zhangsp39114 2022-05-30 10:10:31 +08:00
parent 2f4f6962c6
commit 7ee134470d
1 changed files with 3 additions and 2 deletions

View File

@ -94,8 +94,8 @@
}, },
color: { color: {
deep: true, deep: true,
handler() { handler(color) {
this.showPanelColor = true; this.showPanelColor = !!color.value;
} }
}, },
displayedColor(val) { displayedColor(val) {
@ -144,6 +144,7 @@
if (this.value) { if (this.value) {
this.color.fromString(this.value); this.color.fromString(this.value);
} else { } else {
this.color.value = '';
this.showPanelColor = false; this.showPanelColor = false;
} }
}); });