ant-design / ant-design/pro-components
👑 [需求] ProTable 改进启用 ellipsis 属性后性能.
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
### 🔩 所属模块或组件
ProTable
### 🥰 需求描述
现在 ProTable 设置 ellipsis 属性后默认使用 Typography.Text 来完成 ellipsis 效果, 如果表格数据量大该方式会导致卡顿. 希望 `ellipsis:true` 效果如同 [antd-table-ellipsis](https://ant-design.antgroup.com/components/table-cn?locale=zh-CN&tab=design#table-demo-ellipsis) 一样使用原生省略.
API 建议: 现在 ProTable 的 ellipsis 属性 `boolean | {showTitle?: boolean,tooltip: TooltipProps}`, 可以将 ellipsis 设置为 `{showTitle:true}` 来启用 Typography.Text 渲染.
当前同时 copyable 和 ellipsis 开启的情况下会渲染两个 Typography.Text , 这也会影响性能, 能否将这两个属性开启的情况下,用一个 Typography.Text 来完成该功能.
相关 issues #8868
### ⛰ 功能需求适用场景
### 🧐 解决方案
### 🚑 其他信息
Contributor guide
Research direction
Start at the ProTable ellipsis implementation and review related issue #8868 to understand the current behavior and constraints. Verify rendering with large datasets and the combined copyable-plus-ellipsis case; done means native ellipsis is the default, Typography.Text is opt-in through showTitle, and the combined case avoids duplicate text rendering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100