Browse Source

[release-2.0] fix: the global search keyboard event is not removed when the component is unmounted (#772)

This is an automated cherry-pick of #767

/assign JohnNiang

```release-note
None
```
pull/776/head
Halo Dev Bot 2 years ago committed by GitHub
parent
commit
ec6f39ddd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/layouts/BasicLayout.vue

2
src/layouts/BasicLayout.vue

@ -81,7 +81,7 @@ onMounted(() => {
});
onUnmounted(() => {
document.addEventListener("keydown", handleGlobalSearchKeybinding);
document.removeEventListener("keydown", handleGlobalSearchKeybinding);
});
// Generate menus by routes

Loading…
Cancel
Save