Ant 数据表格字段自定义样式及点击事件

it2025-08-03  7

{ title: '周计划', dataIndex: 'weekPlanNum', width: 150, customRender: _this.lookWeek }, lookWeek(text: any) { const textInfo: string = text === '0' ? '年' : text === '1' ? '月' : text === '2' ? '周' : text === '3' ? '日': '' const color: string = text === '0' ? 'orange' : text === '1' ? '#1890ff' : text === '2' ? '#52c41a' : text === '3' ? '#f33333' : '' return <a-tag color={color}>{textInfo}计划</a-tag> }

 

最新回复(0)