细节优化

This commit is contained in:
kron
2025-11-06 16:19:52 +08:00
parent 5cefd8b36d
commit e942c63885

View File

@@ -47,9 +47,10 @@ const onClick = async (e) => {
const clickYInContainer = e.detail.y - rect.value.top;
let target = clickYInContainer * scale.value - viewportH / 2;
target = Math.max(0, Math.min(contentH - viewportH, target));
console.log(target);
setTimeout(() => {
scrollTop.value = target;
}, 100);
scrollTop.value = target > 180 ? target + 10 : target;
}, 200);
}
const newArrow = {
x: (e.detail.x - 6) * scale.value,