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
1 changed files with 4 additions and 1 deletions

View File

@ -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