perf: 优化窗口大小变化时动态调整分页大小

This commit is contained in:
jmal 2024-05-25 17:22:30 +08:00
parent d01ec9d450
commit 153e5592e4

View File

@ -1546,8 +1546,12 @@ export default {
let gridRowNum = Math.round(
this.clientHeight / (clientWidth / this.gridColumnNum)
)
this.pagination.pageSize =
gridRowNum * this.gridColumnNum + this.gridColumnNum
const lastPageSize = this.pagination.pageSize
const thisPageSize = gridRowNum * this.gridColumnNum + this.gridColumnNum
if (thisPageSize !== lastPageSize) {
this.pagination.pageSize = thisPageSize
this.getFileList()
}
// 使列表可拖拽
this.rowDrop()