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

Tree: issue#1410的tree实例的setItem方法无效仍然存在问题 #1428

Closed
ChangJian2077 opened this issue Aug 15, 2022 · 4 comments
Closed
Labels
🐞 bug Something isn't working to be published to be published

Comments

@ChangJian2077
Copy link

tdesign-vue-next 版本

0.20.0

重现链接

#1410

重现步骤

如上述issue,在新版本下仍然无法通过setItem方法展开,高亮,选中

期望结果

希望该方法能正常运行

实际结果

方法不生效

框架版本

Vue(3.2.13)

浏览器版本

Chrome(104.0.5112.81)

系统版本

No response

Node版本

16.13.2

补充说明

疑似传参options中少传入了directly:true,否则不能调用this.update();刷新树

if (keys.includes(name)) {
          // 疑似少传入{ directly: true }这个options参数导致树不更新
          node[`set${upperFirst(name)}`](spec[name], { directly: true });
}
@github-actions
Copy link
Contributor

👋 @ChangJian2077,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@PengYYYYY
Copy link
Collaborator

有兴趣的话可以提个PR

@PengYYYYY PengYYYYY added the 🐞 bug Something isn't working label Aug 16, 2022
@PengYYYYY PengYYYYY added the to be published to be published label Aug 21, 2022
@github-actions github-actions bot mentioned this issue Aug 23, 2022
16 tasks
@PengYYYYY
Copy link
Collaborator

0.20.2 已修复

@centmaster
Copy link

更新到0.20.2版本
tree.value?.setItem(activeNode?.value, {
checked: true,
actived: true,
expanded: true,
});
节点还是没有高亮,并且打印节点信息checked还是false
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working to be published to be published
Projects
None yet
Development

No branches or pull requests

3 participants