From bb03a5ad84c4679ec48135e3d08c0d5b337ce6b8 Mon Sep 17 00:00:00 2001 From: Zhou Weidong <502333560@qq.com> Date: Mon, 19 Oct 2026 13:21:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(web):=20=E4=BF=AE=E5=A4=8D=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E5=8F=B0=E8=8F=9C=E5=8D=95=E5=9B=BE=E6=A0=87=E7=BB=A7?= =?UTF-8?q?=E6=89=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Menu/src/components/useRenderMenuItem.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/Menu/src/components/useRenderMenuItem.tsx b/src/components/Menu/src/components/useRenderMenuItem.tsx index 0132652..a256571 100644 --- a/src/components/Menu/src/components/useRenderMenuItem.tsx +++ b/src/components/Menu/src/components/useRenderMenuItem.tsx @@ -22,14 +22,17 @@ export const useRenderMenuItem = () => (!onlyOneChild?.children || onlyOneChild?.noShowingChildren) && !meta?.alwaysShow ) { + const leafMeta = onlyOneChild?.meta + ? { + ...onlyOneChild.meta, + icon: onlyOneChild.meta.icon || meta.icon + } + : meta return ( - {{ - default: () => - renderMenuTitle(onlyOneChild ? onlyOneChild?.meta : meta, !nested) - }} + {{ default: () => renderMenuTitle(leafMeta, !nested) }} ) } else {