vue3 + ts 默认 props

145 阅读1分钟
  type Props = {
    visible: boolean
  }
  withDefaults(defineProps<Props>(), {
    visible: false
  })