|
|
|
@ -24,7 +24,7 @@ const CommonTable: FC = (props) => {
|
|
|
|
|
const receiveMessageFromIndex = (event: any) => {
|
|
|
|
|
const data: any = exceptStr(event.data);
|
|
|
|
|
if (!_.isEmpty(data)) {
|
|
|
|
|
const { columns, dataSource, pageInfo, i18n, selectedRowKeys } = data;
|
|
|
|
|
const { columns, dataSource, pageInfo, i18n, selectedRowKeys, selectedKey } = data;
|
|
|
|
|
const { current: pageNum, pageSize: size, total } = pageInfo;
|
|
|
|
|
setDataSource(dataSource);
|
|
|
|
|
setI18n(i18n);
|
|
|
|
@ -38,12 +38,12 @@ const CommonTable: FC = (props) => {
|
|
|
|
|
fixed: "right",
|
|
|
|
|
width: 120,
|
|
|
|
|
render: (_: any, record: any) => {
|
|
|
|
|
return (
|
|
|
|
|
return selectedKey === "list" ? (
|
|
|
|
|
<Space>
|
|
|
|
|
<Button type="link" onClick={() => handleEdit(record)}>{i18n["编辑"]}</Button>
|
|
|
|
|
<Button type="link" onClick={() => handleDelete(record)}>{i18n["删除"]}</Button>
|
|
|
|
|
</Space>
|
|
|
|
|
);
|
|
|
|
|
) : null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]);
|
|
|
|
|