소스 검색

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,