index.vuevue
<Content title="最新熱門電影" v-bind:row=myRow />
let dataStr = ''
export default {
components: {
Content,
List
},
data: () => ({
myRow:dataStr
}),
}
Content.vue
<div v-for="item in JSON.parse(row)">
props: {
title:String,
row:Object,
},
文章
this.item = JSON.parse(this.row)
this.item = this.item[0]