chore(CommandPalette): remove click and to handling

This commit is contained in:
Benjamin Canac
2022-07-18 16:04:47 +02:00
parent af870f90ec
commit d9f08b99ca
2 changed files with 0 additions and 11 deletions

View File

@@ -84,8 +84,6 @@ const props = defineProps({
}
})
const router = useRouter()
const emit = defineEmits(['update:modelValue', 'close'])
const query = ref('')
@@ -131,12 +129,6 @@ function onSelect (option: Command) {
return
}
if (option.click) {
option.click()
} else if (option.to) {
router.push(option.to)
}
emit('update:modelValue', option)
// waiting for modal to be closed

View File

@@ -1,5 +1,4 @@
import type { UseFuseOptions } from '@vueuse/integrations/useFuse'
import type { RouteLocationRaw } from 'vue-router'
export interface Command {
prefix?: string
@@ -11,8 +10,6 @@ export interface Command {
chip?: string
disabled?: boolean
prevent?: boolean
click?: Function
to?: RouteLocationRaw
shortcuts?: string[]
}