- table如何自定义表头和自定义内容
自定义表头直接使用tittle,自定义内容是customRender
javascript
{
title: (
<span>
<img src={alvchat_avatar} style="width:20px;height:20px;vertical-align:bottom"></img>
{t('routes.alerts.columnsAIReview')}
</span>
),
dataIndex: 'reviewMatched',
width: 110,
customRender: ({ text, record }) => {
return (
<span>
{text === true ? <CheckOutlined style="color:green" /> : null}
{text === false ? <CloseOutlined style="color:red" /> : null}
</span>
);
},
},