pagination (antd 分页)

 

// 不显示分页

pagination={false}

//使用分页
<Table<Role>
  rowKey={(record) => record.Id}
  columns={this.columns}
  dataSource={Items}
  loading={loading}
  pagination={
   {

    // hideOnSinglePage 每页数据达到10条时显示分页
       hideOnSinglePage: true,
                
        total: TotalItems,

        //默认显示页面
        current: CurrentPage,  
        // 页面总数
        pageSize: DEFAULT_PAGE_SIZE,   
        }
       }
         onChange={(pagination) => {
           const { current, pageSize } = pagination;
           this.handlePageChange(
                current ?? DEFAULT_PAGE,
                pageSize ?? DEFAULT_PAGE_SIZE
              );
            }}
          />