diff --git a/api-generator/components/megamenu.js b/api-generator/components/megamenu.js index cc47ddc71..aebfd29f2 100644 --- a/api-generator/components/megamenu.js +++ b/api-generator/components/megamenu.js @@ -35,6 +35,10 @@ const MegaMenuSlots = [ { name: 'submenuicon', description: 'Custom submenu icon template.' + }, + { + name: 'itemicon', + description: 'Custom item icon template.' } ]; diff --git a/components/lib/megamenu/MegaMenu.d.ts b/components/lib/megamenu/MegaMenu.d.ts index 3f33559f8..fe03044fd 100755 --- a/components/lib/megamenu/MegaMenu.d.ts +++ b/components/lib/megamenu/MegaMenu.d.ts @@ -79,6 +79,20 @@ export interface MegaMenuSlots { */ 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/megamenu/MegaMenu.vue b/components/lib/megamenu/MegaMenu.vue index c0530c8b3..cc47f2f08 100755 --- a/components/lib/megamenu/MegaMenu.vue +++ b/components/lib/megamenu/MegaMenu.vue @@ -18,7 +18,7 @@ :focusedItemId="focused ? focusedItemId : undefined" :items="processedItems" :horizontal="horizontal" - :template="$slots" + :templates="$slots" :activeItem="activeItem" :exact="exact" :level="0" diff --git a/components/lib/megamenu/MegaMenuSub.vue b/components/lib/megamenu/MegaMenuSub.vue index 06fab2993..2c7fbc615 100644 --- a/components/lib/megamenu/MegaMenuSub.vue +++ b/components/lib/megamenu/MegaMenuSub.vue @@ -17,20 +17,20 @@ :aria-posinset="getAriaPosInset(index)" >
-