Commit fe44201b46fd4d25007152ac884926a0ec64ae84
1 parent
d31b0d47
DatePicker add clearable prop
DatePicker add clearable prop
Showing
2 changed files
with
6 additions
and
1 deletions
Show diff stats
src/components/date-picker/picker.vue
| ... | ... | @@ -158,6 +158,10 @@ |
| 158 | 158 | type: Boolean, |
| 159 | 159 | default: true |
| 160 | 160 | }, |
| 161 | + clearable: { | |
| 162 | + type: Boolean, | |
| 163 | + default: true | |
| 164 | + }, | |
| 161 | 165 | size: { |
| 162 | 166 | validator (value) { |
| 163 | 167 | return oneOf(value, ['small', 'large']); |
| ... | ... | @@ -302,7 +306,7 @@ |
| 302 | 306 | }, |
| 303 | 307 | handleInputMouseenter () { |
| 304 | 308 | if (this.readonly || this.disabled) return; |
| 305 | - if (this.visualValue) { | |
| 309 | + if (this.visualValue && this.clearable) { | |
| 306 | 310 | this.showClose = true; |
| 307 | 311 | } |
| 308 | 312 | }, | ... | ... |