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

View File

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