antd table 超出显示省略号无效果
我是用的css 去做的,具体方法,如下图
{
title: "表头",
dataIndex: "key",
onCell: () => {
return {
style: {
maxWidth: 150,
overflow: "hidden",
whiteSpace: "nowrap",
textOverflow: "ellipsis",
cursor: "pointer",
},
};
},
ellipsis: true,
},
主要是加上onCell 的方法,为列加上样式