遇到了一个ui要求是改变某一表头样式,和某一列单元格样式
改变表头背景色
{
width: "140px",
ellipsis: true,
title: "编制清单",
className: "bgColor",
},
th.bgColor{
background-color: #F08437 !important;
color: #FFF;
}
改变单元格背景色
{
title: "状态",
dataIndex: "plaitEditStatus",
align: "center",
onCell: (record,) => {
return {
style: {
backgroundColor: record.plaitEditStatus == "NOT_EDIT" ? "rgba(208, 20, 33, 0.1)" : "rgba(55, 158, 14, 0.1)"
}
};
},
},