fix: 更新路径检查以包含下载页面的尾部斜杠

This commit is contained in:
2025-06-06 00:32:18 +08:00
parent 134e993274
commit 855250a9f4

View File

@@ -5,7 +5,9 @@ import Button from "primevue/button";
const path = computed(() => {
return useRoute().path;
});
const sProgress = ref(["/", "/download"].includes(path.value) ? 1 : 0);
const sProgress = ref(
["/", "/download", "/download/"].includes(path.value) ? 1 : 0
);
const scrollPanel = useTemplateRef<ComponentPublicInstance>("scrollPanel");
const sX = ref(0);
const sY = ref(0);
@@ -24,7 +26,7 @@ const handleScrollOrResize = () => {
sWidth.value = el.getBoundingClientRect().width;
sHeight.value = el.getBoundingClientRect().height;
}
if (!["/", "/download"].includes(path.value)) {
if (!["/", "/download", "/download/"].includes(path.value)) {
sProgress.value = 0;
return;
}