2
0
mirror of https://github.com/tenrok/vue-context.git synced 2026-06-23 06:40:32 +03:00

Formatting

This commit is contained in:
Randall Wilk
2018-10-15 09:05:16 -05:00
parent 6dfbf4200c
commit 3833e39e50
+10 -10
View File
@@ -77,21 +77,21 @@
window.addEventListener('scroll', this.close); window.addEventListener('scroll', this.close);
}, },
/** /**
* Close the context menu. * Close the context menu.
* *
* @param {boolean|Event} emit Used to prevent event being emitted twice from when menu is clicked and closed * @param {boolean|Event} emit Used to prevent event being emitted twice from when menu is clicked and closed
*/ */
close (emit = true) { close (emit = true) {
this.top = null; this.top = null;
this.left = null; this.left = null;
this.data = null; this.data = null;
this.show = false; this.show = false;
if (emit) { if (emit) {
this.$emit('close'); this.$emit('close');
} }
}, },
/** /**
* Close the menu if `closeOnClick` is set to true. * Close the menu if `closeOnClick` is set to true.