Answer the question
In order to leave comments, you need to log in
Loop for vue tree?
Hello to all!
I need a tree from the comments on the site, I try to execute it through vue.js,
I follow the example from the off-docs https://ru.vuejs.org/v2/examples/tree-view.html
And everything would be fine, but I ran into a problem.
In the off dock, the data array starts with 1 value, in which there are nested children arrays
var data = {
name: 'My Tree',
children: [
...
]
}
var data = [
{
name: 'My Tree',
children: [
...
]
},
{
name: 'My Tree',
children: [
...
]
},
]
'<ul v-if="isReplies" => '<ul v-if="comment.replies"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question