What problem does this feature solve?
Just set expand to true will just expand tree node, but for async node which does not load data yet, it'll not load data automatically. So I want a way to expand node and load data automatically.
What does the proposed API look like?
Maybe use
this.$refs.tree.expand(item)
3条答案
按热度按时间wqsoz72f1#
Translation of this issue:
What problem does this feature solve ###?
Just set expand to true will just expand tree node, but for async node which does not load data yet, it'll not load data automatically. So I want a automatically. way to expand node and load data
What does the proposed API look ### like?
Maybe use
.
This.$refs.tree.expand (item)
.
eni9jsuy2#
@limodou Tree supports async nodes.
Can you provide a jsFiddle with a example where it does not work?
iswrvxsc3#
I mean I want to expand an async node programmatically but not via click arrow. For example I set one node via "nodes[0].expand = true", and nodes[0].loading = false, and nodes[0].children = [], so I want it can trigger loadData method to load data, but it'll not.
For now, I just do it myself via loading data and append to nodes[0].children, and also set its expand to true.