Scenario: I have an array which possesses 4 object i need to display the index of the array can someone help me to do this
Asked
Active
Viewed 252 times
1
-
1Do you mean `
{{ index }} `? – skirtle Dec 16 '19 at 11:11 -
2Please try to avoid using screenshots instead of pasted code in future. It makes it easier for those attempting to help – Martin Dec 16 '19 at 11:13
1 Answers
1
This is as simple as using index
in your output:
<tr v-for="(items,index) in addedArray" :key="items.DataID">
<td>{{ index }}</td>
...
You are already capturing the index in v-for="(items,index) in addedArray"
.

Martin
- 16,093
- 1
- 29
- 48