Skip to content
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

提个优化项。this.$refs.tree.setCheckedKeys #19

Closed
ginkosen opened this issue Jul 15, 2021 · 2 comments
Closed

提个优化项。this.$refs.tree.setCheckedKeys #19

ginkosen opened this issue Jul 15, 2021 · 2 comments

Comments

@ginkosen
Copy link

this.$refs.tree.setCheckedKeys 选中的key是我明确知道的。不应该再触发checked-change事件

@ChuChencheng
Copy link
Collaborator

checked-change 传出去的参数包括了完整的节点信息,里面不止有选中的 key 。

如果在 setCheckedKeys 之后不触发 checked-change ,算是个 breaking change 吧,不太好直接改。

我认为这应该算是个设计缺陷,之前不应该挂太多方法在 $refs 上的 😂

@ginkosen
Copy link
Author

恩。
明白。目前我只能增加一个true/false的状态来控制丢弃通过setCheckedKeys设定的选中节点

@ginkosen ginkosen closed this as completed Dec 7, 2021
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

No branches or pull requests

2 participants