master
lys 2 months ago
parent 7a74b371a1
commit c8dabd2918

@ -61,7 +61,7 @@ const calcFixedTotal: FunctionComponent<Props> = (props) => {
return <Table.Summary.Cell index={index + 1} key={index + 1} align={_.head(columns)?.align || "left"}>
{
loading ? <Spin spinning={loading} size="small"></Spin> :
<Text type="danger">{!_.isNil(sumRow[item.dataIndex]) ? sumRow[item.dataIndex] : "-"}</Text>
<Text type="danger">{(sumRow && !_.isNil(sumRow[item.dataIndex])) ? sumRow[item.dataIndex] : "-"}</Text>
}
</Table.Summary.Cell>;
})

@ -239,9 +239,9 @@ const index: FunctionComponent<Props> = (props) => {
});
};
const rowSelection = {
columnWidth: 60,
columnTitle: isDetailTable && !showTotalCell ? "序号" : "",
renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => (isDetailTable && !showTotalCell ? <span>{index + 1}</span> : originNode),
columnWidth: 50,
columnTitle: isDetailTable ? "序号" : "",
renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => (isDetailTable ? <span>{index + 1}</span> : originNode),
selectedRowKeys,
preserveSelectedRowKeys: true,
onChange: (rowKeys: React.Key[]) => {

Loading…
Cancel
Save