import { Table, TableProps } from 'antd'

export default function DataRender({ pagination = {}, ...props }: TableProps) {
  return (
    <Table
      bordered
      scroll={{ x: 'max-content' }}
      tableLayout="auto"
      size="middle"
      pagination={{
        hideOnSinglePage: true,
        showSizeChanger: true,
        defaultPageSize: 100,
        pageSizeOptions: [10, 20, 50, 100, 200, 500],
        showTotal: (total: number) => `共${total}条数据`,
        ...pagination,
      }}
      {...props}
    />
  )
}
