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

[Table] EnhancedTable 同一行key相同的数据更新后,视图不更新 #2526

Closed
xinller opened this issue Jun 19, 2023 · 6 comments
Closed

Comments

@xinller
Copy link

xinller commented Jun 19, 2023

tdesign-vue 版本

1.3.4

重现链接

No response

重现步骤

用EnhancedTable时,传入data属性,当手动修改data数组中某一行数据时,视图不更新,查看vue-devtool发现,增强型表格内嵌套了primaryTable,在primaryTable中发现传入的data数据未更新,应该是主表格中未进行data的深度监听导致

期望结果

No response

实际结果

No response

框架版本

2.6.14

浏览器版本

No response

系统版本

No response

Node版本

14.19.0

补充说明

No response

@github-actions
Copy link
Contributor

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

@chaishi
Copy link
Collaborator

chaishi commented Jun 19, 2023

从当前描述内容评估,无法处理问题。

请提供可复现问题的代码,我们再处理。

@xinller
Copy link
Author

xinller commented Jun 19, 2023

@uyarn uyarn changed the title [增强型表格] 表格同一行key相同的数据更新后,视图不更新 [Table] EnhancedTable 同一行key相同的数据更新后,视图不更新 Jun 23, 2023
@github-actions
Copy link
Contributor

♥️ 有劳 @chaishi @nined9 @yanxugong @chuyueZhang 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @xinller

@xinller
Copy link
Author

xinller commented Jul 4, 2023

请问这个问题有解决了吗

@chaishi
Copy link
Collaborator

chaishi commented Jul 22, 2023

深度监听是有代价的,要给全部对象的全部属性的全部层级添加监听,消耗较大,故而组件内部不会做深度监听。

数据更新官网有单独的方法,请仔细阅读文档。(更新数据,不是通过调整 data,而是执行组件实例方法 setData 实现。
https://tdesign.tencent.com/vue/components/table?tab=demo
image

image

@chaishi chaishi closed this as completed Jul 22, 2023
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