interface Props {
options: {
label: string
value: string | number | boolean
}[]
color: string
}
const props = withDefaults(defineProps<Props>(), {
options: () => [
{
label: '项1', value: '项1' },
{
label: '项2', value: '项2' }
],
color: 'red'
})
defineProps agrega tipos complejos en el proyecto mecanografiado vue3 y proporciona un valor predeterminado
Supongo que te gusta
Origin blog.csdn.net/weixin_35958891/article/details/131192809
Recomendado
Clasificación