From 70eb9f8e5ee4a90b94d089eb40b2db7537e95178 Mon Sep 17 00:00:00 2001 From: SunTao <328867980@qq.com> Date: Thu, 5 Dec 2024 11:39:17 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E5=BC=B9=E7=AA=97=E5=BD=93=E5=89=8D=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E9=A1=B5=E9=9D=A2=E5=86=85=E5=AE=B9=E5=90=91=E4=B8=8A?= =?UTF-8?q?=E5=A2=9E=E5=8A=A01=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../big-screen/components/img-dialog.vue | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/views/big-screen/components/img-dialog.vue b/src/views/big-screen/components/img-dialog.vue index e5b1eeb..b7ff6f2 100644 --- a/src/views/big-screen/components/img-dialog.vue +++ b/src/views/big-screen/components/img-dialog.vue @@ -2,7 +2,7 @@ * @Author: SunTao 328867980@qq.com * @Date: 2024-10-22 15:30:25 * @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 * @Description: 大屏查看图片弹窗 --> @@ -124,7 +124,7 @@ export default { // 左侧图片数据 defectData: [], // 当前选择的index - currentIndex: 0, + currentIndex: null, // 下方点击的index绑定 selectedThumbnail: 0, // 选中框绑定 @@ -260,7 +260,13 @@ export default { this.imgForm.segmentId = data.segmentId.toString(); this.getList(); } - }); + }).finally(() => { + setTimeout(() => { + if (this.pageTip > 1) { + this.loadMoreTopImages() + } + }, 1000) + }) }, @@ -309,14 +315,12 @@ export default { } else { this.defectData = this.aimList; } - this.loading = false; } }) .finally(() => { this.showImage(this.currentIndex); this.loading = false; }) - }, /** @@ -341,12 +345,11 @@ export default { } else { this.defectData = this.aimList; } - this.loading = false; } - }) - .catch(() => { + }).finally(() => { + this.loading = false; - }); + }) }, /** @@ -473,12 +476,10 @@ export default { * @param {*} * @return {*} */ - handleScroll(e) { + handleScroll() { const sidebar = this.$refs.sidebar; // 滚动到顶加载数据 - console.log(e.target.scrollTop, 'dererere'); - - if (e.target.scrollTop < 20 && this.pageTip > 1 && !this.loading) { + if (sidebar.scrollTop < 2 && this.pageTip > 1 && !this.loading) { this.loadMoreTopImages(); }