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组件在使用自带的pagination时,切换页码,会导致serial-number序号列展示错误 #2939

Closed
yp0413150120 opened this issue Nov 30, 2023 · 4 comments
Labels
invalid This doesn't seem right

Comments

@yp0413150120
Copy link

tdesign-vue 版本

1.8

重现链接

https://codesandbox.io/p/sandbox/tdesign-vue-demo-forked-7j73sh?file=%2Fsrc%2Fdemo.vue%3A29%2C48

重现步骤

1、表格开启分页查询
2、表格columns添加serial-number,序号列
3、切换页码

数据还未返回前,序号列已经错误变更,效果如下图
11

期望结果

序号列正确展示

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

Copy link
Contributor

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

@chaishi
Copy link
Collaborator

chaishi commented Nov 30, 2023

没明白 为何这个会叫“错误的序列号”,第二页就是从 第 11 号开始的啊,还要等什么数据返回呢?我看着视频效果,是完全符合预期的,在我们的业务里面也是符合预期的

辛苦描述下你觉得正确的序列号应当是什么?

@yp0413150120
Copy link
Author

就是你仔细看数据,还是第一页的数据,在第二页数据还没成功返回前,序号就已经切换了,比如明明还是第一页的第一条数据,真正的序号应该是1,但是他的序号变成了11

@chaishi
Copy link
Collaborator

chaishi commented Nov 30, 2023

我明白你的意思了,但是组件内部的序列号是根据 pagination 页码实现的,分页的那一刹那,就已经开始变化,并不会等第二页的数据返回后才开始更新,组件内部也无法分辨 data 的变化是 因为分页产生的,还是因为某个查询条件产生的,还是别的什么情况产生。

综上,组件内部暂时不会进行处理,也无法处理。如果确实有需要,辛苦自行根据业务需求调整序列号,满足你们特殊的业务需求

@chaishi chaishi added the invalid This doesn't seem right label Nov 30, 2023
@chaishi chaishi closed this as completed Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants