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'
})

博主开发了一个浏览器aweb123.com

更多推荐