细节优化
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user