Skip to content

Commit

Permalink
feat: add argument event for open event (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxiong10 committed Apr 22, 2020
1 parent c835c79 commit a4103fa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ Set fixed time list to select;
| --------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| input | When the value change(v-model event) | date |
| change | When the value change(same as input) | date, type('date'\|'hour'\|'minute'\|'second'\|'ampm |
| open | When panel opening | |
| open | When panel opening | event |
| close | When panel closing | |
| confirm | When click 'confirm' button | date |
| clear | When click 'clear' button | |
Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ data() {
| --------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| input | 当选择日期的事件触发 | date |
| change | 当选择日期的事件触发 | date, type('date'\|'hour'\|'minute'\|'second'\|'ampm |
| open | 当弹出层打开时候 | |
| open | 当弹出层打开时候 | event |
| close | 当弹出层关闭时候 | |
| confirm | 当点击确认按钮 | date |
| clear | 当点击清除按钮 | |
Expand Down
6 changes: 3 additions & 3 deletions src/date-picker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,10 @@ export default {
}
}
},
openPopup() {
openPopup(evt) {
if (this.popupVisible) return;
this.defaultOpen = true;
this.$emit('open');
this.$emit('open', evt);
this.$emit('update:open', true);
},
closePopup() {
Expand Down Expand Up @@ -459,7 +459,7 @@ export default {
this.$emit('blur', evt);
},
handleInputFocus(evt) {
this.openPopup();
this.openPopup(evt);
this.$emit('focus', evt);
},
hasSlot(name) {
Expand Down

0 comments on commit a4103fa

Please sign in to comment.