fix: implement index section 7

Co-authored-by: xudeyu444 <xudeyu444@users.noreply.github.com>
Co-authored-by: Sylvanysc <Sylvanysc@users.noreply.github.com>
This commit is contained in:
2025-06-02 23:07:15 +08:00
parent 2c51d41cc7
commit b05118bd61
2 changed files with 57 additions and 3 deletions
+5 -1
View File
@@ -31,7 +31,11 @@ const handleScrollOrResize = () => {
const scrollTop = (scrollPanel.value as unknown as { lastScrollTop: number })
.lastScrollTop;
const clientHeight = scrollPanel.value?.$el.clientHeight;
sProgress.value = 1 - Math.min(scrollTop / clientHeight, 1);
sProgress.value =
1 -
range(0, 1, scrollTop / clientHeight) +
1 -
Math.abs(range(-0.5, 0.5, scrollTop / clientHeight - 6) * 2);
};
onMounted(() => {