From 445776316ebae4831bc51f6a74648b4f3add5004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Thu, 3 Aug 2023 10:26:16 +0300 Subject: [PATCH] Refactor #4211 - For Menubar --- components/lib/menubar/Menubar.d.ts | 4 ++++ components/lib/menubar/MenubarSub.vue | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/components/lib/menubar/Menubar.d.ts b/components/lib/menubar/Menubar.d.ts index 59bfe6d084..8e15cb1dc4 100755 --- a/components/lib/menubar/Menubar.d.ts +++ b/components/lib/menubar/Menubar.d.ts @@ -169,6 +169,10 @@ export interface MenubarContext { * @defaultValue false */ focused: boolean; + /** + * Current level of the menuitem. + */ + level: number; } /** diff --git a/components/lib/menubar/MenubarSub.vue b/components/lib/menubar/MenubarSub.vue index f2a08d6d8d..c660250de2 100755 --- a/components/lib/menubar/MenubarSub.vue +++ b/components/lib/menubar/MenubarSub.vue @@ -144,7 +144,8 @@ export default { item: processedItem, index, active: this.isItemActive(processedItem), - focused: this.isItemFocused(processedItem) + focused: this.isItemFocused(processedItem), + level: this.level } }); },