静态化
index.vue
<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]