From e8c3cd6a8bf642ff06fe3ad8f2f92c7c5348f33e Mon Sep 17 00:00:00 2001 From: jmal Date: Mon, 4 Nov 2024 14:04:01 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96gird=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E4=B8=8B=E6=9F=90=E4=BA=9B=E5=88=86=E8=BE=A8=E7=8E=87?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ShowFile/ShowFile.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index fba52cd..6081d7d 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -1569,9 +1569,12 @@ export default { this.clientHeight / (clientWidth / this.gridColumnNum) ) - if (this.finished) { - let actualRows = Math.ceil(this.fileList.length / this.gridColumnNum) - this.gridMinHeight = actualRows * this.gridItemWidth + (actualRows - 1) * 10 + if (this.finished && this.pagination.pageIndex === 1) { + const actualRows = Math.ceil(this.fileList.length / this.gridColumnNum) + const gridMinHeight = actualRows * this.gridItemWidth + (actualRows - 1) * 10 + if (gridMinHeight < this.clientHeight) { + this.gridMinHeight = gridMinHeight + } } const lastPageSize = this.pagination.pageSize