Merge pull request #304 from jamebal/dev

perf: 优化gird视图下某些分辨率显示不全的问题
This commit is contained in:
jmal 2024-11-04 14:05:01 +08:00 committed by GitHub
commit 25d9cb96c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1569,9 +1569,12 @@ export default {
this.clientHeight / (clientWidth / this.gridColumnNum) this.clientHeight / (clientWidth / this.gridColumnNum)
) )
if (this.finished) { if (this.finished && this.pagination.pageIndex === 1) {
let actualRows = Math.ceil(this.fileList.length / this.gridColumnNum) const actualRows = Math.ceil(this.fileList.length / this.gridColumnNum)
this.gridMinHeight = actualRows * this.gridItemWidth + (actualRows - 1) * 10 const gridMinHeight = actualRows * this.gridItemWidth + (actualRows - 1) * 10
if (gridMinHeight < this.clientHeight) {
this.gridMinHeight = gridMinHeight
}
} }
const lastPageSize = this.pagination.pageSize const lastPageSize = this.pagination.pageSize