0
var userContent = Vue.extend({
props: ['myarr']
template:'<div v-for="m in myarr">{{m}}</div>'
})
var vm = new Vue(
{
el:'body',
components: {userContent}
data:
{
myarr : ["one", "two"]
}
})
這裏是我的jsfeedle代碼https://jsfiddle.net/ojrs6kk5/1/無法獲得道具與Vue的組件工作
我試圖從myarr
值從data
主Vue的應用程序獲得的數據,但它不工作。我做錯了什麼?