import { MyButtons, MyColumns, MyPageContainer, MyProTableProps, usePageTabs, } 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 = '推送任务' }) { // 注册当前页面为标签页 usePageTabs({ tabKey: 'moments-list', tabLabel: title, }); return ( MyProTableProps.request( params, sort, Apis.Customer.CustomerMoments.List, ) } toolBarRender={(action) => [ , ]} columns={[ MyColumns.ID(), { title: '名称', dataIndex: 'name', }, MyColumns.UpdatedAt(), MyColumns.CreatedAt(), MyColumns.Option({ render: (_, item: any, index, action) => ( Apis.Customer.CustomerMomentCategories.Delete({ id: item.id, }).then(() => action?.reload()) } /> ), }), ]} /> ); }