diff --git a/components/lib/contextmenu/ContextMenu.d.ts b/components/lib/contextmenu/ContextMenu.d.ts index cf289aab1..e44f7d71c 100755 --- a/components/lib/contextmenu/ContextMenu.d.ts +++ b/components/lib/contextmenu/ContextMenu.d.ts @@ -73,6 +73,20 @@ export interface ContextMenuSlots { */ 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[]; /** * Custom submenu icon template. */ diff --git a/components/lib/contextmenu/ContextMenu.vue b/components/lib/contextmenu/ContextMenu.vue index 73da3e4dc..d4f78d4e6 100755 --- a/components/lib/contextmenu/ContextMenu.vue +++ b/components/lib/contextmenu/ContextMenu.vue @@ -14,7 +14,7 @@ :menuId="id" :focusedItemId="focused ? focusedItemId : undefined" :items="processedItems" - :template="$slots" + :templates="$slots" :activeItemPath="activeItemPath" :exact="exact" :aria-labelledby="ariaLabelledby" diff --git a/components/lib/contextmenu/ContextMenuSub.vue b/components/lib/contextmenu/ContextMenuSub.vue index 7721f8e16..0c1a8d217 100755 --- a/components/lib/contextmenu/ContextMenuSub.vue +++ b/components/lib/contextmenu/ContextMenuSub.vue @@ -17,20 +17,20 @@ :aria-posinset="getAriaPosInset(index)" >