2
0
mirror of https://github.com/tenrok/vue-context.git synced 2026-06-24 16:10:33 +03:00

Always emit close event

This commit is contained in:
Randall Wilk
2019-06-03 18:30:53 -05:00
parent 5b6dd62705
commit a4586a17f7
2 changed files with 4 additions and 6 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+3 -5
View File
@@ -72,7 +72,7 @@ export default {
eventOn(window, 'scroll', this.close); eventOn(window, 'scroll', this.close);
}, },
close(emit = true) { close() {
if (! this.show) { if (! this.show) {
return; return;
} }
@@ -83,9 +83,7 @@ export default {
this.removeScrollEventListener(); this.removeScrollEventListener();
} }
if (emit) { this.$emit('close');
this.$emit('close');
}
}, },
focusItem(index, items) { focusItem(index, items) {
@@ -129,7 +127,7 @@ export default {
}, },
onClick() { onClick() {
this.close(false); this.close();
}, },
onKeydown(event) { onKeydown(event) {