|
|
@@ -1,10 +1,11 @@
|
|
|
-import {Card, Button, Table, Space} from 'antd';
|
|
|
+import {Card, Button, Table} from 'antd';
|
|
|
import {FC} from 'react';
|
|
|
import MenuModal from './modal';
|
|
|
import {useHandle, useList} from './hooks';
|
|
|
import {PAGE_SIZE_LIST} from '@utils';
|
|
|
import {useContextSection} from '@hooks';
|
|
|
import {context} from '../context';
|
|
|
+import {TableTools} from '@components';
|
|
|
|
|
|
const TableList: FC = function() {
|
|
|
const [{isFetching, data, page, pageSize, count}, {refetch, onPageChange}] = useList();
|
|
|
@@ -14,14 +15,12 @@ const TableList: FC = function() {
|
|
|
return (
|
|
|
<>
|
|
|
<Card className='table-wrapper'>
|
|
|
- <section className='table-tool'>
|
|
|
- <Space>
|
|
|
- <Button type='primary' onClick={onAdd}>新增</Button>
|
|
|
- <Button type='default' onClick={onClose!}>返回</Button>
|
|
|
- </Space>
|
|
|
- </section>
|
|
|
+ <TableTools onClick={onAdd} testId='child_menu_add_btn'>
|
|
|
+ <Button type='default' onClick={onClose!} data-testid='child_menu_back'>返回</Button>
|
|
|
+ </TableTools>
|
|
|
|
|
|
<Table
|
|
|
+ data-testid='child_menu_table'
|
|
|
bordered
|
|
|
columns={columns}
|
|
|
dataSource={data}
|