finish adding own shortcut handler

This commit is contained in:
Nitwel
2020-09-24 11:35:56 +02:00
parent fff2e81bdd
commit 3206b57918
9 changed files with 60 additions and 53 deletions

View File

@@ -34,13 +34,14 @@ export default defineComponent({
setup(props, { emit }) {
const dialog = ref<HTMLElement | null>(null);
useShortcut(
'esc',
() => {
console.log('A', dialog.value);
emit('toggle', false);
if (_active.value) {
emitToggle();
return true;
}
},
ref(document.body)
ref(document.body),
'escape'
);
const localActive = ref(false);

View File

@@ -295,11 +295,11 @@ export default defineComponent({
});
useShortcut(
'mod+a',
() => {
onToggleSelectAll(!allItemsSelected.value);
},
table
table,
'meta+a'
);
return {