Answer the question
In order to leave comments, you need to log in
How to set unique id in v-for loop?
I display elements in a loop using v-for. How can I give the rendered element a unique id attribute?
Answer the question
In order to leave comments, you need to log in
The code will not need to be understood? At least the structure of the array element was given.
In this case, in the forehead you can do this:
<div v-for="(item, index) in items" :key="index" :id="index"></div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question