props使用方法

props默认值

const props = withDefaults(
  defineProps<{
     属性1:booelan
     属性2: string
  }>(),
  {
    属性1:false,
    属性2: ''
  }  
)

  

posted @ 2024-02-20 11:22  coffeemil  阅读(6)  评论(0编辑  收藏  举报