1

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

enter image description here

enter image description here

Mohamed Raza
  • 818
  • 7
  • 24

1 Answers1

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