fix(base-selection): clearable when disabled

This commit is contained in:
07akioni 2020-05-28 13:17:32 +08:00
parent 9ab273fcb6
commit f966827fdc

View File

@ -43,7 +43,7 @@
:arrow="showArrow"
:disabled="disabled"
:active="active"
:clearable="clearable && selected"
:clearable="syntheticClearable && selected"
@clear="handleClear"
/>
</div>
@ -99,7 +99,7 @@
:theme="theme"
:disabled="disabled"
:active="active"
:clearable="clearable && selected"
:clearable="syntheticClearable && selected"
:loading="loading"
@clear="handleClear"
/>
@ -138,7 +138,7 @@
:arrow="showArrow"
:disabled="disabled"
:active="active"
:clearable="clearable && selected"
:clearable="syntheticClearable && selected"
@clear="handleClear"
/>
</div>
@ -170,7 +170,7 @@
:arrow="showArrow"
:disabled="disabled"
:active="active"
:clearable="clearable && selected"
:clearable="syntheticClearable && selected"
:loading="loading"
@clear="handleClear"
/>
@ -255,8 +255,11 @@ export default {
}
},
computed: {
syntheticClearable () {
return this.clearable && !this.disabled
},
showArrow () {
if (!this.clearable) return true
if (!this.syntheticClearable) return true
else return !(this.hover && this.selected)
},
labelPlaceholder () {