-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vue 3 Support #31
Labels
Comments
work for me : main.ts app.directive('hotkey', {
beforeMount: VueHotkey.directive.bind,
updated: VueHotkey.directive.componentUpdated,
unmounted: VueHotkey.directive.unbind,
}); file.vue data() {
return {
searchPanel: false,
}
},
methods: {
showSearch() {
console.log('opened')
this.searchPanel = !this.searchPanel
}
},
computed: {
openSearch() {
return {
'ctrl+f: {
keyup: this.showSearch
}
}
}
} <span v-show="searchPanel" v-hotkey.prevent='openSearch'>Blabla</span> note : |
I have this working in vue3, but my tests that use the directive fail. [Vue warn]: Failed to resolve directive: hotkey |
Open
Published a fork in the meantime https://github.com/wobsoriano/v-hotkey3 With added |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
here's a way to use in Vue 3 in the mean time if anyone needs this:
The text was updated successfully, but these errors were encountered: