pull/6465/head
tugcekucukoglu 2024-09-24 08:38:27 +03:00
parent bc1d251b6c
commit 2f5face87d
2 changed files with 16 additions and 1 deletions

View File

@ -356,6 +356,21 @@ export interface SpeedDialSlots {
*/ */
visible: boolean; visible: boolean;
}): VNode[]; }): VNode[];
/**
* Custom icon template.
* @param {Object} scope - icon slot's params.
*/
itemicon(scope: {
/**
* Menuitem instance
* @type {MenuItem}
*/
item: MenuItem;
/**
* Style class of the icon template
*/
class: any;
}): VNode[];
} }
/** /**

View File

@ -48,7 +48,7 @@
:pt="getPTOptions(`${id}_${index}`, 'pcAction')" :pt="getPTOptions(`${id}_${index}`, 'pcAction')"
> >
<template v-if="item.icon" #icon="slotProps"> <template v-if="item.icon" #icon="slotProps">
<slot name="itemicon" :item="item" :class="[slotProps.class]"> <slot name="itemicon" :item="item" :class="slotProps.class">
<span :class="[item.icon, slotProps.class]" v-bind="getPTOptions(`${id}_${index}`, 'actionIcon')"></span> <span :class="[item.icon, slotProps.class]" v-bind="getPTOptions(`${id}_${index}`, 'actionIcon')"></span>
</slot> </slot>
</template> </template>