This commit is contained in:
tugcekucukoglu 2023-10-31 20:21:47 +03:00
parent e8ebb9bf3f
commit b957ea422d
16 changed files with 74 additions and 13 deletions

View file

@ -297,8 +297,14 @@ export interface SpeedDialSlots {
/**
* Button click function
* @param {Event} event - Browser event.
* @deprecated since v3.39.0. Use 'toggleCallback' property instead.
*/
onClick: (event: Event) => void;
/**
* Button click function
* @param {Event} event - Browser event.
*/
toggleCallback: (event: Event) => void;
}): VNode[];
/**
* Custom icon template.

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" :onClick="onClick">
<slot name="button" :onClick="onClick" :toggleCallback="onClick">
<SDButton
type="button"
:class="[cx('button'), buttonClass]"
@ -138,9 +138,7 @@ export default {
},
onClick(event) {
this.d_visible ? this.hide() : this.show();
this.isItemClicked = true;
this.$emit('click', event);
},
show() {