DatePicker add clearable prop
DatePicker add clearable prop
This commit is contained in:
parent
d31b0d4790
commit
fe44201b46
2 changed files with 6 additions and 1 deletions
|
@ -158,6 +158,10 @@
|
|||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
clearable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
size: {
|
||||
validator (value) {
|
||||
return oneOf(value, ['small', 'large']);
|
||||
|
@ -302,7 +306,7 @@
|
|||
},
|
||||
handleInputMouseenter () {
|
||||
if (this.readonly || this.disabled) return;
|
||||
if (this.visualValue) {
|
||||
if (this.visualValue && this.clearable) {
|
||||
this.showClose = true;
|
||||
}
|
||||
},
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
:editable="true"
|
||||
:format="format"
|
||||
@on-change="change"
|
||||
:clearable="false"
|
||||
:options="options2"></date-picker>
|
||||
</i-col>
|
||||
</row>
|
||||
|
|
Loading…
Add table
Reference in a new issue