diff --git a/api-generator/components/tieredmenu.js b/api-generator/components/tieredmenu.js index 5bfd02c8e..57b1b20d7 100644 --- a/api-generator/components/tieredmenu.js +++ b/api-generator/components/tieredmenu.js @@ -41,6 +41,10 @@ const TieredMenuSlots = [ { name: 'item', description: 'Template of a menuitem.' + }, + { + name: 'submenuicon', + description: 'Custom submenu icon template.' } ]; diff --git a/components/lib/tieredmenu/TieredMenu.d.ts b/components/lib/tieredmenu/TieredMenu.d.ts index aa13d9d98..a7edfd7c3 100755 --- a/components/lib/tieredmenu/TieredMenu.d.ts +++ b/components/lib/tieredmenu/TieredMenu.d.ts @@ -77,6 +77,15 @@ export interface TieredMenuSlots { */ item: MenuItem; }): VNode[]; + /** + * Custom submenu icon template. + */ + submenuicon(scope: { + /** + * Whether item is active + */ + active: boolean; + }): VNode[]; } /** diff --git a/components/lib/tieredmenu/TieredMenu.vue b/components/lib/tieredmenu/TieredMenu.vue index 68100a480..255056b68 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.item" + :template="$slots" :activeItemPath="activeItemPath" :exact="exact" :level="0" diff --git a/components/lib/tieredmenu/TieredMenuSub.vue b/components/lib/tieredmenu/TieredMenuSub.vue index 3214ba1e4..7c26fc64e 100755 --- a/components/lib/tieredmenu/TieredMenuSub.vue +++ b/components/lib/tieredmenu/TieredMenuSub.vue @@ -16,7 +16,7 @@ :aria-posinset="getAriaPosInset(index)" >
-