mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-05 14:28:11 +00:00
format & lint
This commit is contained in:
+27
-26
@@ -1,26 +1,27 @@
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
export default defineComponent({
|
||||
data() {
|
||||
return {
|
||||
preventKeyDown: false,
|
||||
};
|
||||
},
|
||||
|
||||
activated() {
|
||||
window.addEventListener('keydown', this.handleKeyDown);
|
||||
},
|
||||
|
||||
deactivated() {
|
||||
window.removeEventListener('keydown', this.handleKeyDown);
|
||||
},
|
||||
|
||||
methods: {
|
||||
onKeyDownFunction() {},
|
||||
|
||||
handleKeyDown(e: KeyboardEvent) {
|
||||
if (!e.key) return;
|
||||
if (e.key.toLowerCase() == 'f' && !this.preventKeyDown && !e.ctrlKey && !e.altKey) this.onKeyDownFunction();
|
||||
},
|
||||
},
|
||||
});
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
export default defineComponent({
|
||||
data() {
|
||||
return {
|
||||
preventKeyDown: false
|
||||
};
|
||||
},
|
||||
|
||||
activated() {
|
||||
window.addEventListener('keydown', this.handleKeyDown);
|
||||
},
|
||||
|
||||
deactivated() {
|
||||
window.removeEventListener('keydown', this.handleKeyDown);
|
||||
},
|
||||
|
||||
methods: {
|
||||
onKeyDownFunction() {},
|
||||
|
||||
handleKeyDown(e: KeyboardEvent) {
|
||||
if (!e.key) return;
|
||||
if (e.key.toLowerCase() == 'f' && !this.preventKeyDown && !e.ctrlKey && !e.altKey)
|
||||
this.onKeyDownFunction();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user