import { Table, TableProps } from 'antd'

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