Refactor on SpeedDial

pull/5507/head
tugcekucukoglu 2024-03-22 18:54:43 +03:00
parent 6ea5aba58f
commit 06a6d16337
1 changed files with 5 additions and 4 deletions

View File

@ -1,9 +1,10 @@
<template> <template>
<div :ref="containerRef" :class="containerClass" :style="[style, sx('root')]" v-bind="ptmi('root')"> <div :ref="containerRef" :class="containerClass" :style="[style, sx('root')]" v-bind="ptmi('root')">
<slot name="button" :onClick="onClick" :toggleCallback="onClick"> <slot name="button" :onClick="onClick" :toggleCallback="onClick">
<SDButton <Button
type="button" type="button"
:class="[cx('button'), buttonClass]" :class="[cx('button'), buttonClass]"
rounded
@click="onClick($event)" @click="onClick($event)"
:disabled="disabled" :disabled="disabled"
@keydown="onTogglerKeydown" @keydown="onTogglerKeydown"
@ -21,7 +22,7 @@
<component v-else :is="showIcon ? 'span' : 'PlusIcon'" :class="d_visible && !!hideIcon ? hideIcon : showIcon" v-bind="ptm('button')['icon']" data-pc-section="icon" /> <component v-else :is="showIcon ? 'span' : 'PlusIcon'" :class="d_visible && !!hideIcon ? hideIcon : showIcon" v-bind="ptm('button')['icon']" data-pc-section="icon" />
</slot> </slot>
</template> </template>
</SDButton> </Button>
</slot> </slot>
<ul :ref="listRef" :id="id + '_list'" :class="cx('menu')" :style="sx('menu')" role="menu" :aria-activedescendant="focused ? focusedOptionId : undefined" tabindex="-1" @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" v-bind="ptm('menu')"> <ul :ref="listRef" :id="id + '_list'" :class="cx('menu')" :style="sx('menu')" role="menu" :aria-activedescendant="focused ? focusedOptionId : undefined" tabindex="-1" @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" v-bind="ptm('menu')">
<template v-for="(item, index) of model" :key="index"> <template v-for="(item, index) of model" :key="index">
@ -455,8 +456,8 @@ export default {
} }
}, },
components: { components: {
SDButton: Button, Button,
PlusIcon: PlusIcon PlusIcon
}, },
directives: { directives: {
ripple: Ripple, ripple: Ripple,