From 44fe1608806e347ed1a666b4e7cdfeeee4d1d6f2 Mon Sep 17 00:00:00 2001 From: baiyanyun Date: Thu, 4 Jun 2026 16:59:50 +0800 Subject: [PATCH] fix: use child menu title for work tabs --- qiming/src/layouts/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qiming/src/layouts/index.tsx b/qiming/src/layouts/index.tsx index 473c8d5d..bce0902d 100644 --- a/qiming/src/layouts/index.tsx +++ b/qiming/src/layouts/index.tsx @@ -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 [];