forked from vikunja/frontend
chore: add uninstall to shortcut directive
This commit is contained in:
parent
36c4027af6
commit
8f18ce63f8
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user