export const tableColumns = [ { title: '序号', customRender: (text: any) => { return text.index + 1; }, }, { title: '能源种类', dataIndex: 'energyType', }, { title: '计量单位', className: 'unit', dataIndex: 'unit', }, { title: '全年', dataIndex: 'yearly', }, { title: '1月', dataIndex: 'jan', customRender: ({ text, record }) => ({ children: text, attrs: { style: record.janFlag === 1 ? 'color: red' : 'color: blue' } }) }, { title: '2月', dataIndex: 'feb', }, { title: '3月', dataIndex: 'mar', }, { title: '4月', dataIndex: 'apr', }, { title: '5月', dataIndex: 'may', }, { title: '6月', dataIndex: 'jun', }, { title: '7月', dataIndex: 'jul', }, { title: '8月', dataIndex: 'aug', }, { title: '9月', dataIndex: 'sep', }, { title: '10月', dataIndex: 'oct', }, { title: '11月', dataIndex: 'nov', }, { title: '12月', dataIndex: 'dec', }, { title: '操作', key: 'action', width: 130 }, ];