diff --git a/api-generator/components/panelmenu.js b/api-generator/components/panelmenu.js index a534bc763..d15581799 100644 --- a/api-generator/components/panelmenu.js +++ b/api-generator/components/panelmenu.js @@ -27,6 +27,14 @@ const PanelMenuSlots = [ { name: 'submenuicon', description: 'Custom submenu icon template.' + }, + { + name: 'headericon', + description: 'Custom header icon template.' + }, + { + name: 'itemicon', + description: 'Custom item icon template.' } ]; diff --git a/components/lib/panelmenu/PanelMenu.d.ts b/components/lib/panelmenu/PanelMenu.d.ts index 94cb98495..6785b8abc 100755 --- a/components/lib/panelmenu/PanelMenu.d.ts +++ b/components/lib/panelmenu/PanelMenu.d.ts @@ -89,6 +89,34 @@ export interface PanelMenuSlots { */ active: boolean; }): VNode[]; + /** + * Custom header icon template. + * @param {Object} scope - header icon slot's params. + */ + headericon(scope: { + /** + * Menuitem instance + */ + item: MenuItem; + /** + * Style class of the item icon element. + */ + class: any; + }): 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/panelmenu/PanelMenu.vue b/components/lib/panelmenu/PanelMenu.vue index 1b926ac0f..6db4b4516 100644 --- a/components/lib/panelmenu/PanelMenu.vue +++ b/components/lib/panelmenu/PanelMenu.vue @@ -18,7 +18,7 @@ @@ -36,7 +36,7 @@
- +
diff --git a/components/lib/panelmenu/PanelMenuList.vue b/components/lib/panelmenu/PanelMenuList.vue index 05cf8acb7..83cdf691d 100644 --- a/components/lib/panelmenu/PanelMenuList.vue +++ b/components/lib/panelmenu/PanelMenuList.vue @@ -8,7 +8,7 @@ :panelId="panelId" :focusedItemId="focused ? focusedItemId : undefined" :items="processedItems" - :template="template" + :templates="templates" :activeItemPath="activeItemPath" :exact="exact" @focus="onFocus" @@ -34,7 +34,7 @@ export default { type: Array, default: null }, - template: { + templates: { type: Object, default: null }, diff --git a/components/lib/panelmenu/PanelMenuSub.vue b/components/lib/panelmenu/PanelMenuSub.vue index 342f7ac51..277110132 100755 --- a/components/lib/panelmenu/PanelMenuSub.vue +++ b/components/lib/panelmenu/PanelMenuSub.vue @@ -14,20 +14,20 @@ :aria-posinset="getAriaPosInset(index)" >
-