From 973cd2e269b2bbaa236b50f39fd7dec7070c36c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BC=8A=E5=A2=A8?= <1905672206@qq.com> Date: Thu, 5 Dec 2024 10:14:30 +0800 Subject: [PATCH] fix[menu]: the native title attribute of the SubMenu component is always null --- components/menu/src/SubMenu.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/menu/src/SubMenu.tsx b/components/menu/src/SubMenu.tsx index b95076e65..bee2c566e 100644 --- a/components/menu/src/SubMenu.tsx +++ b/components/menu/src/SubMenu.tsx @@ -257,14 +257,15 @@ export default defineComponent({ const subMenuPrefixClsValue = subMenuPrefixCls.value; const icon = props.icon ?? slots.icon?.(props); const expandIcon = props.expandIcon || slots.expandIcon || menuExpandIcon.value; - const title = renderTitle(getPropsSlot(slots, props, 'title'), icon); + const originTitle = getPropsSlot(slots, props, 'title'); + const title = renderTitle(originTitle, icon); return (