mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-06-24 17:40:36 +03:00
fix: fix open event fired multiple times
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user