ant design of the table in the tab

 <Row>  {base ? <Table columns={base.columns} dataSource={base.data} style={{ marginTop: 10 }} pagination={{
                  simple:false,
                  current:basePagination.current,
                  total:basePagination.total,
                  pageSizeOptions:['10','20','30','40','50'],
                  showSizeChanger:true,
                  pageSize:basePagination.pageSize,
                  showTotal: (count=basePagination.total)=>{
                    return '共'+count+'条数据'
                  },
                  //onChange:ChangePage(),
                  onChange:(current,pageSize)=>{
                    onBaseClick(current,pageSize)
                  }
                }}/> : <Empty />} </Row>

Method invocation (page click):

function onBaseClick(current,pageSize){
    dispatch({
      type: "customerProtectLog/queryBase",
      payload: {
        current:current,
        pageSize:pageSize
      }
    })
  }

 

This is just a display table, where there have their own problems:

1, pageSizeOptions not displayed, this can Tell me what network, an array is an array of strings, so the correct parameters to be passed

2, there is a method onChange, The problem here is commented out code, call the backend interface will continue to request the results of the browser stuck. . .

3, pay attention to their order of call parameters, this is the pits   

Guess you like

Origin www.cnblogs.com/notchangeworld/p/11609392.html