mirror of
https://github.com/spark-store-project/spark-store-abyss
synced 2026-06-22 20:04:16 +08:00
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:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user