This commit is contained in:
2025-12-05 22:35:54 +08:00
parent ffdf0502e2
commit 0df73b268a
8 changed files with 493 additions and 554 deletions

View File

@@ -4,8 +4,9 @@ export const basename = BASE_NAME;
console.log(basename);
export const wrapBasename = (path: string) => {
const hasEnd = path.endsWith('/')
if (basename) {
return `${basename}${path}/`;
return `${basename}${path}` + (hasEnd ? '' : '/');
} else {
return path;
}