import { MyButtons, MyColumns, MyPageContainer, MyProTableProps, } from '@/common'; import { Apis } from '@/gen/Apis'; import { ProTable } from '@ant-design/pro-components'; import { Space } from 'antd'; import Create from './modals/Create'; import Update from './modals/Update'; export default function Index({ title = '上游市场' }) { return ( MyProTableProps.request(params, sort, Apis.Markets.List) } toolBarRender={(action) => [ , ]} columns={[ MyColumns.ID(), { title: '市场名称', dataIndex: 'name', }, { title: '市场编号', dataIndex: 'market_no', }, { title: '上游公钥', dataIndex: 'public_key', search: false, }, MyColumns.UpdatedAt(), MyColumns.CreatedAt(), MyColumns.Option({ render: (_, item: any, index, action) => ( Apis.Markets.Delete({ id: item.id }).then(() => action?.reload(), ) } /> ), }), ]} /> ); }