本篇文章給大家帶來的內容是關于Vue中v-for循環節點的實現代碼,有一定的參考價值,有需要的朋友可以參考一下,希望對你有所幫助。
Title父循環第一次 | 子循環第一次 | json數據的第幾條 | 數值 |
---|---|---|---|
{{index}} | {{indo}} | {{bp.index}} | {{bp.childName}} |
let er=new Vue({
el:"#rrn",
data:{
parentList: [
{
childList: [{
index: 1,
childName: "第一個節點"
}, {
index: 2,
childName: "第一個節點"
}, {
index: 3,
childName: "第一個節點"
}, {
index: 4,
childName: "第一個節點"
}, {
index: 5,
childName: "第一個節點"
}]
},
{
childList: [{
index: 6,
childName: "第二個節點"
}, {
index: 7,
childName: "第二個節點"
}, {
index: 8,
childName: "第二個節點"
}, {
index: 9,
childName: "第二個節點"
}, {
index: 10,
childName: "第二個節點"
}]
},
{
childList: [{
index: 11,
childName: "第三個節點"
}, {
index: 12,
childName: "第三個節點"
}, {
index: 13,
childName: "第三個節點"
}, {
index: 14,
childName: "第三個節點"
}, {
index: 15,
childName: "第三個節點"
}]
}]
}
})
相關推薦: