fix:修改图片弹窗当前展示的页面内容向上增加1页

This commit is contained in:
SunTao 2024-12-05 11:39:17 +08:00
parent b91bb4a173
commit 70eb9f8e5e

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-22 15:30:25 * @Date: 2024-10-22 15:30:25
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-12-05 10:00:51 * @LastEditTime: 2024-12-05 11:36:07
* @FilePath: \znxjxt-ui\src\views\big-screen\components\img-dialog.vue * @FilePath: \znxjxt-ui\src\views\big-screen\components\img-dialog.vue
* @Description: 大屏查看图片弹窗 * @Description: 大屏查看图片弹窗
--> -->
@ -124,7 +124,7 @@ export default {
// //
defectData: [], defectData: [],
// index // index
currentIndex: 0, currentIndex: null,
// index // index
selectedThumbnail: 0, selectedThumbnail: 0,
// //
@ -260,7 +260,13 @@ export default {
this.imgForm.segmentId = data.segmentId.toString(); this.imgForm.segmentId = data.segmentId.toString();
this.getList(); this.getList();
} }
}); }).finally(() => {
setTimeout(() => {
if (this.pageTip > 1) {
this.loadMoreTopImages()
}
}, 1000)
})
}, },
@ -309,14 +315,12 @@ export default {
} else { } else {
this.defectData = this.aimList; this.defectData = this.aimList;
} }
this.loading = false;
} }
}) })
.finally(() => { .finally(() => {
this.showImage(this.currentIndex); this.showImage(this.currentIndex);
this.loading = false; this.loading = false;
}) })
}, },
/** /**
@ -341,12 +345,11 @@ export default {
} else { } else {
this.defectData = this.aimList; this.defectData = this.aimList;
} }
this.loading = false;
} }
}) }).finally(() => {
.catch(() => {
this.loading = false; this.loading = false;
}); })
}, },
/** /**
@ -473,12 +476,10 @@ export default {
* @param {*} * @param {*}
* @return {*} * @return {*}
*/ */
handleScroll(e) { handleScroll() {
const sidebar = this.$refs.sidebar; const sidebar = this.$refs.sidebar;
// //
console.log(e.target.scrollTop, 'dererere'); if (sidebar.scrollTop < 2 && this.pageTip > 1 && !this.loading) {
if (e.target.scrollTop < 20 && this.pageTip > 1 && !this.loading) {
this.loadMoreTopImages(); this.loadMoreTopImages();
} }