1 回答
TA贡献1752条经验 获得超4个赞
我发现的解决方案是做一个条件(是true或false):
const columns = [
{
title: "name",
dataIndex: "name",
key: "name",
width: "20%"
},
{
title: "status",
dataIndex: "status",
key: "status",
width: "20%",
render: statut => {
if (statut == true) {
return (
<Tag color="#1890ff" key={statut}>
Is True
</Tag>
);
}
return (
<Tag color="#d48806" key={statut}>
Is False
</Tag>
);
}
},
{title: "Method Paiment",
dataIndex: "method",
key: "method",
width: "20%",
}]
添加回答
举报