Refactor #4274 - For SpeedDial

pull/3943/head^2
Tuğçe Küçükoğlu 2023-08-16 09:45:44 +03:00
parent 2c47b9447a
commit 1d67d47c43
2 changed files with 8 additions and 6 deletions

View File

@ -262,9 +262,10 @@ export interface SpeedDialSlots {
*/
item: MenuItem;
/**
* ıtem click function
* Item click function
* @param {Event} event - Browser event.
*/
onClick: void;
onClick(): void;
}): VNode[];
/**
* Custom button template.
@ -272,9 +273,10 @@ export interface SpeedDialSlots {
*/
button(scope: {
/**
* Toggle metadata
* Button click function
* @param {Event} event - Browser event.
*/
toggle(): void;
onClick(): void;
}): VNode[];
/**
* Custom icon template.
@ -282,7 +284,7 @@ export interface SpeedDialSlots {
*/
icon(scope: {
/**
*
* Visible state of the item
*/
visible: boolean;
}): VNode[];

View File

@ -1,6 +1,6 @@
<template>
<div :ref="containerRef" :class="containerClass" :style="[style, sx('root')]" v-bind="ptm('root')" data-pc-name="speeddial">
<slot name="button" :toggle="onClick">
<slot name="button" :onClick="onClick">
<SDButton
type="button"
:class="[cx('button'), buttonClass]"