Преглед на файлове

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

杨奕 преди 7 години
родител
ревизия
27a8c1556e
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  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,