Commit 7b7178f1650c3bd54d2a8d411995f4bc10679e9d
1 parent
f7674b5b
fixed #528
Showing
3 changed files
with
7 additions
and
3 deletions
Show diff stats
.gitignore
examples/routers/date.vue
1 | 1 | <template> |
2 | 2 | <div> |
3 | 3 | {{ val1 }} |
4 | - <Date-picker v-model="val1" type="daterange" placeholder="选择日期" style="width: 200px"></Date-picker> | |
4 | + <Date-picker v-model="val1" type="date" placeholder="选择日期" style="width: 200px"></Date-picker> | |
5 | 5 | <div @click="val1 = '2017-03-02'">change</div> |
6 | 6 | </div> |
7 | 7 | </template> | ... | ... |
src/components/date-picker/picker.vue
... | ... | @@ -359,8 +359,11 @@ |
359 | 359 | this.showClose = false; |
360 | 360 | }, |
361 | 361 | handleIconClick () { |
362 | - if (!this.showClose) return; | |
363 | - this.handleClear(); | |
362 | + if (this.showClose) { | |
363 | + this.handleClear(); | |
364 | + } else { | |
365 | + this.handleFocus(); | |
366 | + } | |
364 | 367 | }, |
365 | 368 | handleClear () { |
366 | 369 | this.visible = false; | ... | ... |