|
@@ -199,10 +199,12 @@ const bigScroll = ({ scrollTop }) => {
|
|
|
value.value = scrollTop;
|
|
|
};
|
|
|
const scrollTo = (page) => {
|
|
|
- console.log(page);
|
|
|
const targetElement = document.getElementById(`pdf${page - 1}`);
|
|
|
if (targetElement) {
|
|
|
targetElement.scrollIntoView({ behavior: "smooth" });
|
|
|
+ setTimeout(() => {
|
|
|
+ newBigScrollTop.value = value.value;
|
|
|
+ }, 1000);
|
|
|
}
|
|
|
};
|
|
|
const scrollbar = ref(null);
|
|
@@ -396,6 +398,7 @@ const rendered = () => {
|
|
|
} else if (newBigScrollTop.value > value.value) {
|
|
|
newBigScrollTop.value = value.value;
|
|
|
}
|
|
|
+
|
|
|
// 阻止默认行为(如页面滚动)
|
|
|
ev.preventDefault();
|
|
|
});
|