| | |
| | | import { App as AntdApp, Button } from 'antd'; |
| | | import { createXxxColumns } from './columns'; |
| | | import { deleteXxx, getXxxList } from './server'; |
| | | import type { XxxQuery, XxxRecord } from './types'; |
| | | import type { XxxListParams, XxxQuery, XxxRecord } from './types'; |
| | | import './Xxx.scss'; |
| | | |
| | | const Xxx = () => { |
| | |
| | | [handleDelete], |
| | | ); |
| | | |
| | | const fetchList = useCallback( |
| | | (params: XxxListParams) => getXxxList(params), |
| | | [], |
| | | ); |
| | | |
| | | return ( |
| | | <div className="xxx-page"> |
| | | <ProTable<XxxRecord, XxxQuery> |
| | | rowKey="key" |
| | | actionRef={actionRef} |
| | | columns={columns} |
| | | cardProps={{ className: 'xxx-table-card' }} |
| | | search={{ labelWidth: 'auto', defaultCollapsed: false }} |
| | | scroll={{ x: 900 }} |
| | | options={false} |
| | |
| | | 新增 |
| | | </Button>, |
| | | ]} |
| | | request={(params) => getXxxList(params)} |
| | | request={fetchList} |
| | | /> |
| | | </div> |
| | | ); |