fix: use child menu title for work tabs

This commit is contained in:
baiyanyun
2026-06-04 16:59:50 +08:00
parent f9e090125c
commit 44fe160880

View File

@@ -76,16 +76,16 @@ const findMenuTrail = (
? [...parents, { key: menuKey, title: menu.name }]
: parents;
if (isMenuPathMatch(menu.path, pathname)) {
return currentTrail;
}
if (menu.children?.length) {
const childTrail = findMenuTrail(menu.children, pathname, currentTrail);
if (childTrail.length) {
return childTrail;
}
}
if (isMenuPathMatch(menu.path, pathname)) {
return currentTrail;
}
}
return [];