|
|
|
|
@ -76,6 +76,7 @@
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
isBkgLoad: false,
|
|
|
|
|
done: 0,
|
|
|
|
|
isShowProgress: true,
|
|
|
|
|
area: {
|
|
|
|
|
@ -120,9 +121,14 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
load () {
|
|
|
|
|
this.isBkgLoad = true
|
|
|
|
|
this.area.w = this.$refs['image'].getBoundingClientRect().width
|
|
|
|
|
this.area.h = this.$refs['image'].getBoundingClientRect().height
|
|
|
|
|
|
|
|
|
|
this.scroll()
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
scroll () {
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
let element = document.getElementById("img-container"); // 获取需要滚动的元素
|
|
|
|
|
let scrollLeft = element.scrollWidth / 2 - element.offsetWidth / 2; // 计算横向滚动条滚动的位置
|
|
|
|
|
@ -131,7 +137,6 @@ export default {
|
|
|
|
|
element.scrollTop = scrollTop; // 设置纵向滚动条的位置
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async getPoints () {
|
|
|
|
|
@ -187,11 +192,18 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
mounted () {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
onLoad() {
|
|
|
|
|
onLoad () {
|
|
|
|
|
this.getPoints()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
onShow () {
|
|
|
|
|
if (this.isBkgLoad) {
|
|
|
|
|
this.scroll();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|