From e146b4847dd58db7d9eb3416fc1d67d2437f5e50 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Thu, 24 Mar 2022 23:57:43 +0800 Subject: [PATCH] fix: menuItem custom icon lose custom class, close #5390 --- components/menu/src/MenuItem.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/components/menu/src/MenuItem.tsx b/components/menu/src/MenuItem.tsx index 2cd39b881..b68199bca 100644 --- a/components/menu/src/MenuItem.tsx +++ b/components/menu/src/MenuItem.tsx @@ -233,9 +233,13 @@ export default defineComponent({ onFocus={onInternalFocus} title={typeof title === 'string' ? title : undefined} > - {cloneElement(icon, { - class: `${prefixCls.value}-item-icon`, - })} + {cloneElement( + icon, + { + class: `${prefixCls.value}-item-icon`, + }, + false, + )} {renderItemChildren(icon, children)}