Answer the question
In order to leave comments, you need to log in
How to make an infinite loop through descendants in vue.js?
From the Backend comes an object that has a list of items, some have children, and so on. The nesting list can be endless. You need to render this object into a hierarchical tree, like this:
I just made three nested v-for loops, but I need a more flexible way so that I can add a fourth level of nesting, etc.
Answer the question
In order to leave comments, you need to log in
Here, straight from the standard examples https://vuejs.org/v2/examples/tree-view.html , I did something similar a week ago.
The tree itself, however, is stored in vuex, for which I had to transfer the example a bit both for my data and for my actions. But it’s not difficult there, as a person with vue, I’m only two weeks old :-)
It turned out something like this:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question