style: 优化最近界面grid视图下首次分页大小

This commit is contained in:
jmal 2024-05-27 11:24:23 +08:00
parent 9f9fbebe22
commit 2944bfca05
2 changed files with 9 additions and 14 deletions

View File

@ -1253,10 +1253,7 @@ export default {
created() {},
watch: {
$route(to) {
if (
to.query.tagId &&
this.queryCondition.tagId !== this.$route.query.tagId
) {
if (to.query.tagId && this.queryCondition.tagId !== this.$route.query.tagId) {
this.queryCondition.tagId = this.$route.query.tagId
this.getFileList()
}
@ -1514,9 +1511,6 @@ export default {
this.onCreateFilename = ''
}, 2000)
},
load() {
this.getFileList(true)
},
gridItemClick(row) {
if (this.selectFile) {
this.fileClick(row)
@ -1548,8 +1542,11 @@ export default {
)
const lastPageSize = this.pagination.pageSize
const thisPageSize = gridRowNum * this.gridColumnNum + this.gridColumnNum
if (thisPageSize !== lastPageSize && this.$route.path === '/') {
if (thisPageSize !== lastPageSize) {
this.pagination.pageSize = thisPageSize
if (this.$route.query.tagId) {
this.queryCondition.tagId = this.$route.query.tagId
}
this.getFileList()
}
@ -2714,7 +2711,9 @@ export default {
})
this.$refs.fileListTable.reloadData(this.fileList)
setTimeout(() => {
this.$refs.fileListTable.reloadData(this.fileList)
if (this.$refs.fileListTable) {
this.$refs.fileListTable.reloadData(this.fileList)
}
}, 0)
}
// 数据全部加载完成
@ -3055,7 +3054,7 @@ export default {
if (this.listModeSearch) {
this.searchFile(this.searchFileName)
} else {
this.getFileList()
this.containerResize()
}
}
},

View File

@ -221,10 +221,6 @@ export default {
tagClick(tag) {
this.$router.push(`/tag?tagId=${tag.id}`);
},
mouseleave() {
},
onmousemove() {
},
progressFormat() {
if (this.takeUpSpace === 0) {
this.takeUpSpace = this.userInfo.takeUpSpace