chore: add uninstall to shortcut directive

This commit is contained in:
kolaente 2021-11-03 19:47:53 +01:00
parent 36c4027af6
commit 8f18ce63f8
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B

View File

@ -1,10 +1,13 @@
import {Directive} from 'vue' import {Directive} from 'vue'
import {install} from '@github/hotkey' import {install, uninstall} from '@github/hotkey'
const directive: Directive = { const directive: Directive = {
mounted(el, {value}) { mounted(el, {value}) {
install(el, value) install(el, value)
}, },
beforeUnmount(el) {
uninstall(el)
},
} }
export default directive export default directive