问题:
在使用AntDesign的表格组件时,我已经设置了每个单元格的宽度,当文本溢出时,我想要文本截断并显示省略号。最终目标是当用户将鼠标悬停在省略号上时,显示一个带有隐藏文本的工具提示。
这是我的现有代码:
<Table
scroll={{ x: 1500, y: 240 }}
pagination={false}
columns={displayFile.headers.map((header) => ({
title: header.name,
dataIndex: header.name,
width: "10rem",
}))}
dataSource={displayFile.data.map((row, index) => ({
...row,
rowKey: `${displayFile.name}-row_${index}`,
}))}
rowKey={(record: any) => record.rowKey}
/>
非常感谢您提供任何见解。谢谢!