瀏覽代碼

Input: disabled Input should not show clear icon (#10331)

杨奕 7 年之前
父節點
當前提交
430c149d88
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/input/src/input.vue

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

@@ -197,7 +197,7 @@
         return this.$slots.prepend || this.$slots.append;
       },
       showClear() {
-        return this.clearable && this.currentValue !== '' && (this.focused || this.hovering);
+        return this.clearable && !this.disabled && this.currentValue !== '' && (this.focused || this.hovering);
       }
     },