perf: keyshortcut directive #1315

Merged
jsegarra merged 7 commits from improve_shortcut_directive into dev 2025-02-06 07:14:23 +00:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit c067006d08 - Show all commits

View File

@ -1,6 +1,6 @@
export default {
mounted(el, binding) {
const shortcut = binding.value ?? '+';
const shortcut = binding.value || '+';
const { key, ctrl, alt, callback } =
typeof shortcut === 'string'
@ -8,7 +8,7 @@ export default {
key: shortcut,
ctrl: true,
alt: true,
callback: () => el.click(),
callback: () => el?.click(),
}
: binding.value;