2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-06-23 08:00:36 +03:00

feat: add argument event for open event (#457)

This commit is contained in:
mengxiong10
2020-04-22 13:50:29 +08:00
parent c835c79aef
commit a4103fa3e8
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -270,7 +270,7 @@ Set fixed time list to select;
| --------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | | --------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| input | When the value change(v-model event) | date | | input | When the value change(v-model event) | date |
| change | When the value change(same as input) | date, type('date'\|'hour'\|'minute'\|'second'\|'ampm | | 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 | | | close | When panel closing | |
| confirm | When click 'confirm' button | date | | confirm | When click 'confirm' button | date |
| clear | When click 'clear' button | | | clear | When click 'clear' button | |
+1 -1
View File
@@ -267,7 +267,7 @@ data() {
| --------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | | --------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| input | 当选择日期的事件触发 | date | | input | 当选择日期的事件触发 | date |
| change | 当选择日期的事件触发 | date, type('date'\|'hour'\|'minute'\|'second'\|'ampm | | change | 当选择日期的事件触发 | date, type('date'\|'hour'\|'minute'\|'second'\|'ampm |
| open | 当弹出层打开时候 | | | open | 当弹出层打开时候 | event |
| close | 当弹出层关闭时候 | | | close | 当弹出层关闭时候 | |
| confirm | 当点击确认按钮 | date | | confirm | 当点击确认按钮 | date |
| clear | 当点击清除按钮 | | | clear | 当点击清除按钮 | |
+3 -3
View File
@@ -399,10 +399,10 @@ export default {
} }
} }
}, },
openPopup() { openPopup(evt) {
if (this.popupVisible) return; if (this.popupVisible) return;
this.defaultOpen = true; this.defaultOpen = true;
this.$emit('open'); this.$emit('open', evt);
this.$emit('update:open', true); this.$emit('update:open', true);
}, },
closePopup() { closePopup() {
@@ -459,7 +459,7 @@ export default {
this.$emit('blur', evt); this.$emit('blur', evt);
}, },
handleInputFocus(evt) { handleInputFocus(evt) {
this.openPopup(); this.openPopup(evt);
this.$emit('focus', evt); this.$emit('focus', evt);
}, },
hasSlot(name) { hasSlot(name) {