Antd table问题
// ellipsis:如果是自定义渲染的列,该属性不会生效,内容会直接被截取
const columns = [
{
title: '商品名称',
dataIndex: 'title',
render: (text, record) => {
return (
<div className={styles.goodsWrapper}>
<div className={styles.img}>
<img src={record.picture} alt="" />
</div>
<div style={{ width: '60%' }}>
<div style={{ marginBottom: 16 }}>{record.title}</div>
<div style={{ color: '#999', fontSize: 12 }}>商品id:{record.numId}</div>
</div>
</div>
);
},
},
{
title: '价格(海贝)',
dataIndex: 'price',
ellipsis: true,
},
];