有個(gè)問題想請教大佬場景:我要v-for循環(huán)一個(gè)數(shù)據(jù),數(shù)據(jù)是通過接口獲取到的,但是循環(huán)出來的一個(gè)子項(xiàng)我想通過這個(gè)子項(xiàng)去查數(shù)據(jù)接口獲取另外一個(gè)數(shù)組再在這個(gè)子項(xiàng)下面循環(huán)出一個(gè)新的列表出來。對于這種情況大佬們有什么好的解決方案示例代碼:<div v-for='item of items'> <p>
<ul>
這個(gè)列表的循環(huán),通過item.name的值去異步獲取接口得到數(shù)據(jù)subitems再去循環(huán) <li v-for='subitem of subitems'></li>
</ul>
</p></div>
添加回答
舉報(bào)
0/150
提交
取消