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

View File

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