1
0

fix: navigation 404

This commit is contained in:
gin
2026-05-08 17:13:52 +08:00
parent cc20e89161
commit b44e9882a1
3 changed files with 32 additions and 4 deletions
@@ -1,4 +1,5 @@
<script setup lang="ts">
import path from "path";
import { getConfig } from "@/config";
import { menuType } from "../../types";
import extraIcon from "./extraIcon.vue";
@@ -174,10 +175,7 @@ function resolvePath(routePath) {
return routePath || props.basePath;
} else {
// 使用path.posix.resolve替代path.resolve 避免windows环境下使用electron出现盘符问题
const segments = `${props.basePath}/${routePath}`
.split("/")
.filter(Boolean);
return `/${segments.join("/")}`;
return path.posix.resolve(props.basePath, routePath);
}
}
</script>