import React from 'react'; import type { ProColumns } from '@ant-design/pro-table'; import ProTable from '@ant-design/pro-table'; type GithubIssueItem = { key: number; name: string; createdAt: number; }; const columns: ProColumns[] = [ { title: '序号', dataIndex: 'index', valueType: 'indexBorder', }, { title: '标题', dataIndex: 'name', search: false, }, { title: '创建时间', key: 'since', dataIndex: 'created_at', valueType: 'dateTime', }, ]; export default () => ( columns={columns} request={async (params) => { console.log(params); return { data: [ { key: 1, name: `TradeCode ${1}`, createdAt: 1602572994055, }, ], success: true, }; }} search={false} rowKey="key" options={{ search: true, }} headerTitle="toolbar 中搜索" /> );