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
View File
@@ -41,6 +41,7 @@
"jsencrypt": "^3.3.2",
"mitt": "^3.0.0",
"nprogress": "^0.2.0",
"path": "^0.12.7",
"pinia": "^2.1.4",
"pinyin-pro": "^3.15.2",
"cropperjs": "^1.5.13",
@@ -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>