这样是不行的:
const {color} = defineProps<Props>();
如果想解构的话可以像这样做:
const props = defineProps<Props>(); const {color} = toRefs(props)
或者就直接使用 props 属性就行了,不解构。