Explorar el Código

ColorPicker: empty value by v-model, fix #4662

pengchongfu hace 8 años
padre
commit
5fc7e18891
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      packages/color-picker/src/main.vue

+ 3 - 1
packages/color-picker/src/main.vue

@@ -59,7 +59,9 @@
 
     watch: {
       value(val) {
-        if (val && val !== this.color.value) {
+        if (!val) {
+          this.showPanelColor = false;
+        } else if (val && val !== this.color.value) {
           this.color.fromString(val);
         }
       },