Commit 7b7178f1650c3bd54d2a8d411995f4bc10679e9d

Authored by 梁灏
1 parent f7674b5b

fixed #528

.gitignore
... ... @@ -7,6 +7,7 @@
7 7 *.bak
8 8 .DS_Store
9 9 node_modules/
  10 +node_modules2/
10 11 .project
11 12 .settings
12 13 npm-debug.log
... ...
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;
... ...