Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
场景:我有一个拥有 4 个对象的数组,我需要显示数组的索引,有人可以帮我这样做吗
这就像index在输出中使用一样简单:
index
<tr v-for="(items,index) in addedArray" :key="items.DataID"> <td>{{ index }}</td> ...
您已经在v-for="(items,index) in addedArray".
v-for="(items,index) in addedArray"