Ant Design 表格tr行添加背景色

时间:2020-12-29 20:28:29
.clickRowStyle{background-color:#ecf6fd;}
//高亮
setRowClassName(record){
if(record.orderCode == null || record.warehouseCode == null || record.operateTime == null){
return 'clickRowStyle'
}
}
 
<Table
components={this.components}
columns={columns}
dataSource={this.state.tData}
scroll={{ x:2100,y:400}}
pagination={this.state.pagination}
onChange={this.handleTableChange}
rowClassName={this.setRowClassName} //高亮
/>