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()
},