2
0
mirror of https://github.com/tenrok/vue-context.git synced 2026-06-13 08:22:24 +03:00

3.4 updates (#16)

This commit is contained in:
Randall Wilk
2019-04-03 20:26:45 -05:00
committed by GitHub
parent 924203f4f2
commit 9d5c9da356
12 changed files with 3839 additions and 4904 deletions
+8 -6
View File
@@ -61,12 +61,6 @@
};
},
mounted () {
if (this.closeOnScroll) {
this.addScrollEventListener();
}
},
beforeDestroy () {
if (this.closeOnScroll) {
this.removeScrollEventListener();
@@ -96,6 +90,10 @@
this.data = null;
this.show = false;
if (this.closeOnScroll) {
this.removeScrollEventListener();
}
if (emit) {
this.$emit('close');
}
@@ -124,6 +122,10 @@
this.positionMenu(event.clientY, event.clientX);
this.$el.focus();
if (this.closeOnScroll) {
this.addScrollEventListener();
}
this.$emit('open', event, this.data, this.top, this.left);
});
},