mirror of https://github.com/halo-dev/halo-admin
[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
parent
a3caa29efa
commit
ec6f39ddd4
|
@ -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