Добавил keyHooks - перехват и подписку на события клавиатуры

This commit is contained in:
Book Pauk
2019-01-11 01:53:45 +07:00
parent 6fdb2e134f
commit 64bff259ff
2 changed files with 36 additions and 5 deletions

View File

@@ -65,6 +65,8 @@ class Reader extends Vue {
this.commit = this.$store.commit;
this.dispatch = this.$store.dispatch;
this.reader = this.$store.state.reader;
this.$root.addKeyHook(this.keyHook);
}
get loaderActive() {
@@ -98,11 +100,15 @@ class Reader extends Vue {
result = 'LoaderPage';
if (!result) {
this.commit('reader/setLoaderActive', true);
result = 'LoaderPage';
//this.commit('reader/setLoaderActive', true);
//result = 'LoaderPage';
}
return result;
}
keyHook(event) {
//console.log(this.componentActive);
}
}
//-----------------------------------------------------------------------------
//, .tool-button:focus, .tool-button:active, .tool-button:hover