From 153e5592e4a727330c8a822268b5511cc3f2dac5 Mon Sep 17 00:00:00 2001 From: jmal Date: Sat, 25 May 2024 17:22:30 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E7=AA=97=E5=8F=A3?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E5=8F=98=E5=8C=96=E6=97=B6=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=88=86=E9=A1=B5=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ShowFile/ShowFile.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index b51ca9d..f7e795d 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -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()