人不狠话不多,就一句,好记性不如烂笔头。
一般我们用vue 循环数组的时候,通常是打点属性例如
<tr class="a" v-for="(item,index) in data1" :key="index">{{item.name}}</tr>

但是现在数组里的key是数字所以无法打点取值,这时候应该怎么办呢

像这样 就这样就可以啦

双重循环呗
人不狠话不多,就一句,好记性不如烂笔头。
一般我们用vue 循环数组的时候,通常是打点属性例如
<tr class="a" v-for="(item,index) in data1" :key="index">{{item.name}}</tr>
但是现在数组里的key是数字所以无法打点取值,这时候应该怎么办呢
像这样 就这样就可以啦
双重循环呗
本文标题:for循环类数组对象
本文链接:https://www.haomeiwen.com/subject/vkrxoftx.html
网友评论