Эх сурвалжийг харах

Input: hide clear button when readonly (#10998)

杨奕 7 жил өмнө
parent
commit
d304cb27cf

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

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