mirror of https://github.com/ElemeFE/element
Input: hide clear button when readonly (#10998)
parent
dd773b9e72
commit
d304cb27cf
|
@ -196,7 +196,11 @@
|
||||||
return this.$slots.prepend || this.$slots.append;
|
return this.$slots.prepend || this.$slots.append;
|
||||||
},
|
},
|
||||||
showClear() {
|
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);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue