mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 08:52:34 +00:00
Refactor #3965 - Update For SplitButton
This commit is contained in:
parent
16abc9e835
commit
2bd47577db
2 changed files with 3 additions and 5 deletions
|
@ -50,9 +50,7 @@ const classes = {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
button: 'p-splitbutton-defaultbutton',
|
button: 'p-splitbutton-defaultbutton',
|
||||||
icon: ({ props }) => props.icon,
|
menuButton: 'p-splitbutton-menubutton'
|
||||||
menuButton: 'p-splitbutton-menubutton',
|
|
||||||
menuButtonIcon: ({ props }) => props.menuButtonIcon
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const { load: loadStyle } = useStyle(styles, { id: 'primevue_splitbutton_style', manual: true });
|
const { load: loadStyle } = useStyle(styles, { id: 'primevue_splitbutton_style', manual: true });
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<PVSButton type="button" :class="cx('button')" :label="label" :disabled="disabled" :aria-label="label" @click="onDefaultButtonClick" :pt="ptm('button')" v-bind="buttonProps">
|
<PVSButton type="button" :class="cx('button')" :label="label" :disabled="disabled" :aria-label="label" @click="onDefaultButtonClick" :pt="ptm('button')" v-bind="buttonProps">
|
||||||
<template #icon="slotProps">
|
<template #icon="slotProps">
|
||||||
<slot name="icon">
|
<slot name="icon">
|
||||||
<span :class="[cx('icon'), slotProps.class]" v-bind="ptm('button')['icon']" />
|
<span :class="[icon, slotProps.class]" v-bind="ptm('button')['icon']" />
|
||||||
</slot>
|
</slot>
|
||||||
</template>
|
</template>
|
||||||
</PVSButton>
|
</PVSButton>
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
>
|
>
|
||||||
<template #icon="slotProps">
|
<template #icon="slotProps">
|
||||||
<slot name="menubuttonicon">
|
<slot name="menubuttonicon">
|
||||||
<component :is="menuButtonIcon ? 'span' : 'ChevronDownIcon'" :class="[cx('menuButtonIcon'), slotProps.class]" v-bind="ptm('menuButton')['icon']" />
|
<component :is="menuButtonIcon ? 'span' : 'ChevronDownIcon'" :class="[menuButtonIcon, slotProps.class]" v-bind="ptm('menuButton')['icon']" />
|
||||||
</slot>
|
</slot>
|
||||||
</template>
|
</template>
|
||||||
</PVSButton>
|
</PVSButton>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue