参考文章:
添加链接描述
取不到就去root取
console.log(this.$refs.tree)
console.log(this.$refs.tree.store.root.childNodes)
console.log(this.$refs.tree.store.nodesMap)
console.log(this.$refs.tree.store._getAllNodes())
这篇博客探讨了在Vue.js应用中如何通过`$refs`获取树形组件的数据。作者展示了如何访问`tree`引用,以及通过`store`属性获取根节点的子节点、节点映射和所有节点的详细方法,为开发者提供了获取和操作复杂组件数据的指导。
参考文章:
添加链接描述
取不到就去root取
console.log(this.$refs.tree)
console.log(this.$refs.tree.store.root.childNodes)
console.log(this.$refs.tree.store.nodesMap)
console.log(this.$refs.tree.store._getAllNodes())
5925
4906
1000

被折叠的 条评论
为什么被折叠?