fix(theme): sidebar prefix concat incorrectly

This commit is contained in:
pengzhanbo 2025-10-08 12:50:49 +08:00
parent 3b5e2cc5b3
commit 9f3de6b8ea

View File

@ -118,10 +118,10 @@ export function getSidebar(routePath: string, routeLocal: string): ResolvedSideb
)
}
else if (isArray(sidebar)) {
return resolveSidebarItems(sidebar, dir)
return resolveSidebarItems(sidebar, routeLocal)
}
else if (isPlainObject(sidebar)) {
const prefix = normalizePrefix(dir, sidebar.prefix)
const prefix = normalizePrefix(routeLocal, removeLeadingSlash(sidebar.prefix || ''))
return resolveSidebarItems(
sidebar.items === 'auto'
? autoDirSidebar.value[prefix]