Skip to content

Commit

Permalink
Merge pull request #299 from jamebal/dev
Browse files Browse the repository at this point in the history
perf: 优化gird视图下某些分辨率显示不全的问题
  • Loading branch information
jamebal authored Oct 24, 2024
2 parents d5f0a4d + 75a8e39 commit 9124d7d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/components/ShowFile/ShowFile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,9 @@
:border="false"
:style="{
width: '100%',
'max-height': clientHeight - 25 + 'px',
rowGap: '8px',
maxHeight: clientHeight - 25 + 'px',
minHeight: gridMinHeight + 'px',
rowGap: '10px',
overflow: 'auto',
'box-shadow':
fileListScrollTop > 0
Expand Down Expand Up @@ -1069,6 +1070,7 @@ export default {
gridColumnNum: -1,
gridPaddingRight: 0,
gridItemWidth: 125,
gridMinHeight: 125,
allChecked: false,
summaries: '',
shareDialogVisible: false,
Expand Down Expand Up @@ -1566,6 +1568,12 @@ export default {
let gridRowNum = Math.round(
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
}
const lastPageSize = this.pagination.pageSize
const thisPageSize = gridRowNum * this.gridColumnNum + this.gridColumnNum
if (thisPageSize !== lastPageSize) {
Expand Down

0 comments on commit 9124d7d

Please sign in to comment.