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:
+8
-6
@@ -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);
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user