fix(theme): incorrect sidebar when items as auto, close #635 (#638)

This commit is contained in:
pengzhanbo 2025-07-05 23:22:41 +08:00 committed by GitHub
parent 4590703e63
commit d27121a558
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -153,7 +153,7 @@ function resolveSidebarItems(
}
const nextPrefix = normalizePrefix(_prefix, prefix || dir)
if (items === 'auto') {
navLink.items = autoDirSidebar.value[nextPrefix]
navLink.items = resolveSidebarItems(autoDirSidebar.value[nextPrefix], nextPrefix)
if (!navLink.link && autoHomeData.value[nextPrefix]) {
navLink.link = normalizeLink(autoHomeData.value[nextPrefix])
const nav = resolveNavLink(navLink.link)