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

fix: fix open event fired multiple times

This commit is contained in:
mengxiong10
2020-03-02 12:05:48 +08:00
parent 006249dd3f
commit be26d2a046
+2
View File
@@ -400,11 +400,13 @@ export default {
} }
}, },
openPopup() { openPopup() {
if (this.popupVisible) return;
this.defaultOpen = true; this.defaultOpen = true;
this.$emit('open'); this.$emit('open');
this.$emit('update:open', true); this.$emit('update:open', true);
}, },
closePopup() { closePopup() {
if (!this.popupVisible) return;
this.defaultOpen = false; this.defaultOpen = false;
this.$emit('close'); this.$emit('close');
this.$emit('update:open', false); this.$emit('update:open', false);