Menu item icon slot added
parent
66d93651b9
commit
a75e7c6bc8
|
@ -137,6 +137,10 @@ const SplitButtonSlots = [
|
|||
{
|
||||
name: 'menubuttonicon',
|
||||
description: 'Custom menu button icon template.'
|
||||
},
|
||||
{
|
||||
name: 'menuitemicon',
|
||||
description: 'Custom menu item icon template.'
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
@ -205,6 +205,16 @@ export interface SplitButtonSlots {
|
|||
*/
|
||||
class: string;
|
||||
}): VNode[];
|
||||
/**
|
||||
* Custom menu item icon template.
|
||||
* @param {Object} scope - menubuttonicon slot's params.
|
||||
*/
|
||||
menuitemicon(scope: {
|
||||
/**
|
||||
* Menuitem instance
|
||||
*/
|
||||
item: MenuItem;
|
||||
}): VNode[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -49,7 +49,11 @@
|
|||
</slot>
|
||||
</template>
|
||||
</PVSButton>
|
||||
<PVSMenu ref="menu" :id="ariaId + '_overlay'" :model="model" :popup="true" :autoZIndex="autoZIndex" :baseZIndex="baseZIndex" :appendTo="appendTo" :unstyled="unstyled" :pt="ptm('menu')" />
|
||||
<PVSMenu ref="menu" :id="ariaId + '_overlay'" :model="model" :popup="true" :autoZIndex="autoZIndex" :baseZIndex="baseZIndex" :appendTo="appendTo" :unstyled="unstyled" :pt="ptm('menu')">
|
||||
<template v-if="$slots.menuitemicon" #itemicon="slotProps">
|
||||
<slot name="menuitemicon" :item="slotProps.item" />
|
||||
</template>
|
||||
</PVSMenu>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
Loading…
Reference in New Issue