Skip to content

节点更新功能什么时候推出呢? #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
KevinNian opened this issue Jul 26, 2024 · 3 comments · Fixed by #102
Closed

节点更新功能什么时候推出呢? #99

KevinNian opened this issue Jul 26, 2024 · 3 comments · Fixed by #102

Comments

@KevinNian
Copy link

问题描述
现在想要更新某个节点,执行的是remove旧节点,prepend新节点。
期待推出更新某个或者多个节点的方法。
组件版本

  • Vue3
  • @wsfe/vue-tree
@ChuChencheng
Copy link
Collaborator

不好意思,我尽快看看

能麻烦具体描述一下场景么,比如

  • 更新单个节点的话,是只更新 title 么
  • 批量更新多个节点是需要更新哪些字段?

关联的 issue: #61 #85 #97

@KevinNian
Copy link
Author

不好意思,我尽快看看

能麻烦具体描述一下场景么,比如

  • 更新单个节点的话,是只更新 title 么
  • 批量更新多个节点是需要更新哪些字段?

关联的 issue: #61 #85 #97

感谢作者的响应,具体场景:这是一个组织机构树,当机构中的公司或个人被删除后,需要实时更新树上的节点被删除(这一步已已经通过删除方法实现),如果机构或个人的状态或有了新的消息或新的警告,需要实时标记在节点上,包括节点title,但不限于title,还有图标改动,就像在节点上进行闪烁或停止闪烁的图标切换,这需要节点数据状态的更新才能实现。
关于批量更新情况是,初始化时因为数据很大10W+的节点数据,使用的是setData方法初始化,数据中节点除了基础的id pid 关系以外其他都是自定义的数据,批量更新肯定是想替换除了层级关系以外的其他数据。更进一步讲就连层级关系也可以批量更新(当然现在提供了删除和添加节点的单独方法,这个可以暂时不考虑)。

@ChuChencheng
Copy link
Collaborator

https://wsfe.github.io/vue-tree/examples/node-manipulation.html#update-custom-field
可以看看有没有满足需求

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants