Answer the question
In order to leave comments, you need to log in
What is the correct way to get DOM elements in the order they are on the page when using VUE v-for?
Good afternoon.
I'll try constructively:
<Foo v-for="el of elems" :key="el" ref="el">{{ el }}</Foo>
Answer the question
In order to leave comments, you need to log in
Temporarily did this:
let dws = [];
if (this._vnode && this._vnode.children) {
for (let chVnode of this._vnode.children) {
if (chVnode.componentInstance) {// В вашем случае может понадобиться более сложный фильтр
dws.push(chVnode.componentInstance);
}
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question