From 4858a1fc94e77e33d3a4a74669bd2832db55d168 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Mon, 17 Apr 2023 09:34:43 +0300 Subject: [PATCH] Refactor #3832 Refactor #3833 - For TabMenu --- api-generator/components/tabmenu.js | 4 ++++ components/lib/tabmenu/TabMenu.d.ts | 14 ++++++++++++++ components/lib/tabmenu/TabMenu.vue | 4 ++-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/api-generator/components/tabmenu.js b/api-generator/components/tabmenu.js index 8f3954a6e..c586f2fdd 100644 --- a/api-generator/components/tabmenu.js +++ b/api-generator/components/tabmenu.js @@ -42,6 +42,10 @@ const TabMenuSlots = [ { name: 'item', description: 'Template of a menuitem.' + }, + { + name: 'itemicon', + description: 'Custom item icon template.' } ]; diff --git a/components/lib/tabmenu/TabMenu.d.ts b/components/lib/tabmenu/TabMenu.d.ts index f6e54f9c8..351197ec2 100755 --- a/components/lib/tabmenu/TabMenu.d.ts +++ b/components/lib/tabmenu/TabMenu.d.ts @@ -68,6 +68,20 @@ export interface TabMenuSlots { */ item: MenuItem; }): VNode[]; + /** + * Custom item icon template. + * @param {Object} scope - item icon slot's params. + */ + itemicon(scope: { + /** + * Menuitem instance + */ + item: MenuItem; + /** + * Style class of the item icon element. + */ + class: any; + }): VNode[]; } /** diff --git a/components/lib/tabmenu/TabMenu.vue b/components/lib/tabmenu/TabMenu.vue index ad14ccb41..8e7945b7c 100755 --- a/components/lib/tabmenu/TabMenu.vue +++ b/components/lib/tabmenu/TabMenu.vue @@ -17,7 +17,7 @@ @click="onItemClick($event, item, i, navigate)" @keydown="onKeydownItem($event, item, i, navigate)" > - + {{ label(item) }} @@ -27,7 +27,7 @@