From 5439e0c164127dee050de4be71c1f4a16f16b9b2 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Fri, 28 Apr 2023 15:37:29 +0800 Subject: [PATCH] fix: submenu type lose theme --- components/menu/demo/sider-current.vue | 6 +++--- components/menu/demo/submenu-theme.vue | 2 +- components/menu/src/interface.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/menu/demo/sider-current.vue b/components/menu/demo/sider-current.vue index 104930f71..81f936bcc 100644 --- a/components/menu/demo/sider-current.vue +++ b/components/menu/demo/sider-current.vue @@ -50,18 +50,18 @@ function getItem( } const items: ItemType[] = reactive([ - getItem('Navigation One', 'sub1', h(MailOutlined), [ + getItem('Navigation One', 'sub1', () => h(MailOutlined), [ getItem('Option 1', '1'), getItem('Option 2', '2'), getItem('Option 3', '3'), getItem('Option 4', '4'), ]), - getItem('Navigation Two', 'sub2', h(AppstoreOutlined), [ + getItem('Navigation Two', 'sub2', () => h(AppstoreOutlined), [ getItem('Option 5', '5'), getItem('Option 6', '6'), getItem('Submenu', 'sub3', null, [getItem('Option 7', '7'), getItem('Option 8', '8')]), ]), - getItem('Navigation Three', 'sub4', h(SettingOutlined), [ + getItem('Navigation Three', 'sub4', () => h(SettingOutlined), [ getItem('Option 9', '9'), getItem('Option 10', '10'), getItem('Option 11', '11'), diff --git a/components/menu/demo/submenu-theme.vue b/components/menu/demo/submenu-theme.vue index fedca46f1..f1e7f4b44 100644 --- a/components/menu/demo/submenu-theme.vue +++ b/components/menu/demo/submenu-theme.vue @@ -66,7 +66,7 @@ const items: ComputedRef = computed(() => [ getItem( 'Navigation One', 'sub1', - h(MailOutlined), + () => h(MailOutlined), [getItem('Option 1', '1'), getItem('Option 2', '2'), getItem('Option 3', '3')], theme.value, ), diff --git a/components/menu/src/interface.ts b/components/menu/src/interface.ts index 137b67039..4338abc46 100644 --- a/components/menu/src/interface.ts +++ b/components/menu/src/interface.ts @@ -16,7 +16,7 @@ export interface SubMenuType extends ItemSharedProps { disabled?: boolean; key: string; - + theme?: MenuTheme; rootClassName?: string; // >>>>> Icon