diff --git a/src/pages/calcTable/calcFixedTotal.tsx b/src/pages/calcTable/calcFixedTotal.tsx index 6e61bbd..b450542 100644 --- a/src/pages/calcTable/calcFixedTotal.tsx +++ b/src/pages/calcTable/calcFixedTotal.tsx @@ -61,7 +61,7 @@ const calcFixedTotal: FunctionComponent = (props) => { return { loading ? : - {!_.isNil(sumRow[item.dataIndex]) ? sumRow[item.dataIndex] : "-"} + {(sumRow && !_.isNil(sumRow[item.dataIndex])) ? sumRow[item.dataIndex] : "-"} } ; }) diff --git a/src/pages/calcTable/index.tsx b/src/pages/calcTable/index.tsx index c2d96ac..0e74e6d 100644 --- a/src/pages/calcTable/index.tsx +++ b/src/pages/calcTable/index.tsx @@ -239,9 +239,9 @@ const index: FunctionComponent = (props) => { }); }; const rowSelection = { - columnWidth: 60, - columnTitle: isDetailTable && !showTotalCell ? "序号" : "", - renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => (isDetailTable && !showTotalCell ? {index + 1} : originNode), + columnWidth: 50, + columnTitle: isDetailTable ? "序号" : "", + renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => (isDetailTable ? {index + 1} : originNode), selectedRowKeys, preserveSelectedRowKeys: true, onChange: (rowKeys: React.Key[]) => {