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,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
|
clearable: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
size: {
|
size: {
|
||||||
validator (value) {
|
validator (value) {
|
||||||
return oneOf(value, ['small', 'large']);
|
return oneOf(value, ['small', 'large']);
|
||||||
|
@ -302,7 +306,7 @@
|
||||||
},
|
},
|
||||||
handleInputMouseenter () {
|
handleInputMouseenter () {
|
||||||
if (this.readonly || this.disabled) return;
|
if (this.readonly || this.disabled) return;
|
||||||
if (this.visualValue) {
|
if (this.visualValue && this.clearable) {
|
||||||
this.showClose = true;
|
this.showClose = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
:editable="true"
|
:editable="true"
|
||||||
:format="format"
|
:format="format"
|
||||||
@on-change="change"
|
@on-change="change"
|
||||||
|
:clearable="false"
|
||||||
:options="options2"></date-picker>
|
:options="options2"></date-picker>
|
||||||
</i-col>
|
</i-col>
|
||||||
</row>
|
</row>
|
||||||
|
|
Loading…
Add table
Reference in a new issue