antd 表格组件table 添加分页 跳转功能 react umi

效果展示

在这里插入图片描述

代码


function showTotal(total: any) {
    return `Total ${total} items`;
  }

<Table
        columns={columns}
        dataSource={dataSource}
        pagination={{pageSize: 6}}
      />
      <Pagination
        showQuickJumper
        defaultCurrent={2}
        total={500}
        // onChange={onChange}
        showTotal={showTotal}
      />
.ant-table-tbody > tr.ant-table-row:hover > td, .ant-table-tbody > tr > td.ant-table-cell-row-hover {
    background: rgba(24, 110, 129, 0.6);
  }
  .ant-table-thead > tr > th {
    color: white;
    //font-weight: 500;
    text-align: left;
    background: transparent;
    border-bottom: 2px solid #23e5fd;
  }
  .ant-table-tbody > tr > td {
    border-bottom: 1px solid rgb(27, 85, 107);
  }
  .ant-table-tbody tr{
    height: 40px;
    line-height: 40px;
    text-align: center;
  }
  .ant-table-thead > tr > th {
    color: white;
    font-weight: 500;
    text-align: center;
    border-bottom: 1px solid transparent;
    height: 50px;
  }
  .ant-table-tbody > tr.ant-table-row:hover > td, .ant-table-tbody > tr > td.ant-table-cell-row-hover {
    background: rgba(24, 112, 129, 0.6);
  }
  .ant-table-thead > tr > th, .ant-table-tbody > tr > td, .ant-table tfoot > tr > th, .ant-table tfoot > tr > td {
    padding: 0;
  }
  .ant-table {
    background: transparent;
    color: white;
    line-height: 35px;
    font-size: 13px;
  }
  .ant-pagination {
    color: white;
    margin-top: 13px;
    text-align: center;
  }
  .ant-table-pagination {
    display: none;
  }
  .ant-select {
    display: none;
  }
  .ant-pagination-item a {
    color: rgb(248, 251, 253);
  }
  .ant-pagination-item {
    background: transparent;
    border: 1px solid transparent;
  }
  .ant-pagination-prev .ant-pagination-item-link, .ant-pagination-next .ant-pagination-item-link {
    background-color: rgb(14, 92, 102);
    border: 1px solid rgb(14, 92, 102);
  }
  .anticon {
    color: white;
  }
  .ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-ellipsis {
    color: rgb(248, 251, 253);
  }

  .vehicle_show .ant-pagination-item {
    background: transparent;
    border: 1px solid transparent;
  }
  .ant-pagination-item-active {
    font-weight: 500;
    background: rgb(35, 229, 253);
    border-color: rgb(35, 229, 253);
  }
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值