父亲:
<test122 :title='title' :catename="catename"></test122>
data() {
return {
num:1,
title:'我是你明哥哥',
catename:['红豆','花生','小米']
}
},
子组件:
<view class="">{{title}}</view>
<view v-for="(item,index) in catename" :key="index">
{{item}}
</view>
props:['title','catename']