|
|
|
@ -50,7 +50,7 @@ const index: FunctionComponent<Props> = (props) => {
|
|
|
|
|
const {
|
|
|
|
|
columns, dataSource, pageInfo, selectedRowKeys, i18n: i18nRes = {},
|
|
|
|
|
showTotalCell = false, sumRowlistUrl = "", payload = {}, calcDetail,
|
|
|
|
|
fixed = true, tableScrollHeight, sumRow
|
|
|
|
|
fixed = true, tableScrollHeight, sumRow, optWidth
|
|
|
|
|
} = data;
|
|
|
|
|
setSumRowlistUrl(sumRowlistUrl);
|
|
|
|
|
setShowTotalCell(showTotalCell);
|
|
|
|
@ -64,7 +64,7 @@ const index: FunctionComponent<Props> = (props) => {
|
|
|
|
|
setSelectedRowKeys(selectedRowKeys);
|
|
|
|
|
setTableScrollHeight(tableScrollHeight);
|
|
|
|
|
setColumns([...convertColumns(_.map(columns, o => ({ ...o, i18n: i18nRes }))), {
|
|
|
|
|
title: i18nRes["操作"], dataIndex: "operate", fixed: "right", width: 220,
|
|
|
|
|
title: i18nRes["操作"], dataIndex: "operate", fixed: "right", width: optWidth || 120,
|
|
|
|
|
render: (__, record) => (<Space>
|
|
|
|
|
<Button type="link" onClick={() => handleEdit(record?.id)}>{i18nRes["编辑"]}</Button>
|
|
|
|
|
<Button type="link"
|
|
|
|
|