"Vue.js defineProps"의 두 판 사이의 차이

잔글 (Jmnote님이 Vue.js defineProps 문서를 Vue.js defineProps() 문서로 이동했습니다)
(차이 없음)

2023년 10월 19일 (목) 17:02 판

1 개요

Vue.js defineProps
const props = defineProps({
  foo: String
})
const props = defineProps<{
  foo: string
  bar?: number
}>()
export interface Props {
  msg?: string
  labels?: string[]
}

const props = withDefaults(defineProps<Props>(), {
  msg: 'hello',
  labels: () => ['one', 'two']
})

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}