VUE 傳遞資料

tongyuruo發表於2020-03-19

1、 父親->子:props
父親以標籤傳遞給兒子
兒子用props接收資料:
props: {
title: String,
likes: Number,
isPublished: Boolean,
commentIds: Array,
author: Object,
callback: Function,
contactsPromise: Promise // or any other constructor
}

2、子-> 夫 emit Event

相關文章