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
* @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();
}