fix(command-dialog-fuse): fix command.md code preview

This commit is contained in:
hrynevych.romann 2024-01-17 21:14:53 +02:00
parent 36a6668c35
commit 6ac1fefd2a

View File

@ -166,15 +166,15 @@ import {
const open = ref(false) const open = ref(false)
const { Meta_J, Ctrl_J } = useMagicKeys({ const { Meta_M, Ctrl_M } = useMagicKeys({
passive: false, passive: false,
onEventFired(e) { onEventFired(e) {
if (e.key === 'j' && (e.metaKey || e.ctrlKey)) if (e.key === 'm' && (e.metaKey || e.ctrlKey))
e.preventDefault() e.preventDefault()
}, },
}) })
watch([Meta_J, Ctrl_J], (v) => { watch([Meta_M, Ctrl_M], (v) => {
if (v[0] || v[1]) if (v[0] || v[1])
handleOpenChange() handleOpenChange()
}) })
@ -202,7 +202,7 @@ function customFiltering(val: string[], term: string) {
<kbd <kbd
class="pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100" class="pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100"
> >
<span class="text-xs"></span>J <span class="text-xs"></span>M
</kbd> </kbd>
</p> </p>
<CommandDialog v-model:open="open" :filter-function="customFiltering"> <CommandDialog v-model:open="open" :filter-function="customFiltering">