Pagination 分页

在使用分页的时候,每次切换pageSize的时候,需要把current-page置为1 重新加载数据。

但是当current-page !== 1的时候,修改current-page的值,这时就会触发current-change事件。

如果current-page===1的时候,则不会触发current-change事件。

所以我们在进行changeSize的时候。需要进行current的判断。

handleSizeChange(val) {
  this.pgParam.pageSize = val
    if (this.pgParam.pageNum !== 1) {
      this.pgParam.pageNum = 1
    } else {
   this.handleGetImageList()
  }
},
handleCurrentChange(val) {
  this.pgParam.pageNum = val
  this.handleGetImageList()
},

 

 

相关文章:

  • 2021-06-19
  • 2021-12-14
  • 2021-11-18
  • 2021-11-27
  • 2021-10-22
  • 2021-04-25
  • 2021-09-28
  • 2022-12-23
猜你喜欢
  • 2021-12-12
  • 2022-02-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案