diff --git a/api-generator/components/tieredmenu.js b/api-generator/components/tieredmenu.js index 57b1b20d7..bbe629896 100644 --- a/api-generator/components/tieredmenu.js +++ b/api-generator/components/tieredmenu.js @@ -45,6 +45,10 @@ const TieredMenuSlots = [ { name: 'submenuicon', description: 'Custom submenu icon template.' + }, + { + name: 'itemicon', + description: 'Custom item icon template.' } ]; diff --git a/components/lib/tieredmenu/TieredMenu.d.ts b/components/lib/tieredmenu/TieredMenu.d.ts index a7edfd7c3..a8c124c1e 100755 --- a/components/lib/tieredmenu/TieredMenu.d.ts +++ b/components/lib/tieredmenu/TieredMenu.d.ts @@ -86,6 +86,20 @@ export interface TieredMenuSlots { */ active: boolean; }): 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/tieredmenu/TieredMenu.vue b/components/lib/tieredmenu/TieredMenu.vue index 255056b68..552ddb0eb 100755 --- a/components/lib/tieredmenu/TieredMenu.vue +++ b/components/lib/tieredmenu/TieredMenu.vue @@ -16,7 +16,7 @@ :menuId="id" :focusedItemId="focused ? focusedItemId : undefined" :items="processedItems" - :template="$slots" + :templates="$slots" :activeItemPath="activeItemPath" :exact="exact" :level="0" diff --git a/components/lib/tieredmenu/TieredMenuSub.vue b/components/lib/tieredmenu/TieredMenuSub.vue index fe189db2c..82cf151c4 100755 --- a/components/lib/tieredmenu/TieredMenuSub.vue +++ b/components/lib/tieredmenu/TieredMenuSub.vue @@ -16,7 +16,7 @@ :aria-posinset="getAriaPosInset(index)" >