fix: passing the generic type that is expected in command.vue

This commit is contained in:
Shl 2024-07-08 21:29:55 +07:00
parent 8c143aed99
commit 7bcfb71ae2

View File

@ -1,12 +1,11 @@
<script setup lang="ts">
<script setup lang="ts" generic="T extends string | number | boolean | Record<string, any>">
import { type HTMLAttributes, computed } from 'vue'
import type { ComboboxRootEmits, ComboboxRootProps } from 'radix-vue'
import { ComboboxRoot, useForwardPropsEmits } from 'radix-vue'
import { cn } from '@/lib/utils'
const props = withDefaults(defineProps<ComboboxRootProps & { class?: HTMLAttributes['class'] }>(), {
const props = withDefaults(defineProps<ComboboxRootProps<T> & { class?: HTMLAttributes['class'] }>(), {
open: true,
modelValue: '',
})
const emits = defineEmits<ComboboxRootEmits>()