diff --git a/src/directives/shortcut.ts b/src/directives/shortcut.ts index 24824d477..30b1f1ce4 100644 --- a/src/directives/shortcut.ts +++ b/src/directives/shortcut.ts @@ -1,10 +1,13 @@ import {Directive} from 'vue' -import {install} from '@github/hotkey' +import {install, uninstall} from '@github/hotkey' const directive: Directive = { mounted(el, {value}) { install(el, value) }, + beforeUnmount(el) { + uninstall(el) + }, } export default directive