mirror of https://github.com/halo-dev/halo
fix: the global search keyboard event is not removed when the component is unmounted (halo-dev/console#767)
#### What type of PR is this? /kind bug #### What this PR does / why we need it:  #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/2927 #### Special notes for your reviewer: #### Does this PR introduce a user-facing change? ```release-note None ```pull/3445/head
parent
44dd95d415
commit
e523a3e309
|
@ -81,7 +81,7 @@ onMounted(() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
document.addEventListener("keydown", handleGlobalSearchKeybinding);
|
document.removeEventListener("keydown", handleGlobalSearchKeybinding);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Generate menus by routes
|
// Generate menus by routes
|
||||||
|
|
Loading…
Reference in New Issue