ant table 前面选择按钮禁用 、、设置表格行颜色

const rowSelection = {
  onChange: (selectedRowKeys, selectedRows) => {
    console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
  },

//  前面选择按钮禁用
  getCheckboxProps: (record) => ({
    disabled: record.name === 'Disabled User',
    // Column configuration not to be checked
    name: record.name,
  }),
};

 

rowClassName={(record) => setRowColor(record)}
// 设置背景颜色
const setRowColor = (record) => (record?.generateStatus === '0' ? myStyle.rowColor : '');

你可能感兴趣的:(typescript,javascript,前端)