Explorar o código

Input: not show clear button when value is null (#10912)

杨奕 %!s(int64=7) %!d(string=hai) anos
pai
achega
27a8c1556e
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      packages/input/src/input.vue

+ 3 - 1
packages/input/src/input.vue

@@ -122,7 +122,9 @@
 
     data() {
       return {
-        currentValue: this.value === undefined ? '' : this.value,
+        currentValue: this.value === undefined || this.value === null
+          ? ''
+          : this.value,
         textareaCalcStyle: {},
         prefixOffset: null,
         suffixOffset: null,