在 js 的data()返回值的内部有customRender这个属性是可以进行判断的,其有两个值,text参数为当前行的值;record参数为当前行数据。
例:
{ title:'使用状态', align:"center", dataIndex: 'status', customRender: (text, record) => { if (text === 2) { return '使用' } else if (text === 3) { return '未使用' } } },
截图:
在 js 的data()返回值的内部有customRender这个属性是可以进行判断的,其有两个值,text参数为当前行的值;record参数为当前行数据。
例:
{ title:'使用状态', align:"center", dataIndex: 'status', customRender: (text, record) => { if (text === 2) { return '使用' } else if (text === 3) { return '未使用' } } },
截图: