mirror of
https://github.com/spark-store-project/spark-store-abyss
synced 2025-12-17 12:51:38 +08:00
feat: 简化导航栏滚动动画逻辑,统一不同页面行为
This commit is contained in:
8
app.vue
8
app.vue
@@ -7,9 +7,7 @@ const appConfig = useAppConfig();
|
||||
const path = computed(() => {
|
||||
return useRoute().path;
|
||||
});
|
||||
const sProgress = ref(
|
||||
["/", "/download", "/download/"].includes(path.value) ? 1 : 0
|
||||
);
|
||||
const sProgress = ref(1);
|
||||
const scrollPanel = useTemplateRef<ComponentPublicInstance>("scrollPanel");
|
||||
const sX = ref(0);
|
||||
const sY = ref(0);
|
||||
@@ -28,10 +26,6 @@ const handleScrollOrResize = () => {
|
||||
sWidth.value = el.getBoundingClientRect().width;
|
||||
sHeight.value = el.getBoundingClientRect().height;
|
||||
}
|
||||
if (!["/", "/download", "/download/"].includes(path.value)) {
|
||||
sProgress.value = 0;
|
||||
return;
|
||||
}
|
||||
const scrollTop = (scrollPanel.value as unknown as { lastScrollTop: number })
|
||||
.lastScrollTop;
|
||||
const clientHeight = scrollPanel.value?.$el.clientHeight;
|
||||
|
||||
Reference in New Issue
Block a user