mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 17:02:38 +00:00
Refactor #5681
This commit is contained in:
parent
3cc675e50f
commit
e1367fd494
89 changed files with 376 additions and 339 deletions
9
components/lib/splitbutton/SplitButton.d.ts
vendored
9
components/lib/splitbutton/SplitButton.d.ts
vendored
|
@ -71,19 +71,20 @@ export interface SplitButtonPassThroughOptions {
|
|||
*/
|
||||
root?: SplitButtonPassThroughOptionType;
|
||||
/**
|
||||
* Used to pass attributes to the button's DOM element.
|
||||
* Used to pass attributes to the Button component.
|
||||
* @see {@link ButtonPassThroughOptions}
|
||||
*/
|
||||
button?: SplitButtonPassThroughOptionType;
|
||||
pcButton?: ButtonPassThroughOptions<SplitButtonSharedPassThroughMethodOptions>;
|
||||
/**
|
||||
* Used to pass attributes to the Button component.
|
||||
* @see {@link ButtonPassThroughOptions}
|
||||
*/
|
||||
dropdown?: ButtonPassThroughOptions<SplitButtonSharedPassThroughMethodOptions>;
|
||||
pcDropdown?: ButtonPassThroughOptions<SplitButtonSharedPassThroughMethodOptions>;
|
||||
/**
|
||||
* Used to pass attributes to the TieredMenu component.
|
||||
* @see {@link TieredMenuPassThroughOptions}
|
||||
*/
|
||||
menu?: TieredMenuPassThroughOptions<SplitButtonSharedPassThroughMethodOptions>;
|
||||
ptMenu?: TieredMenuPassThroughOptions<SplitButtonSharedPassThroughMethodOptions>;
|
||||
/**
|
||||
* Used to manage all lifecycle hooks.
|
||||
* @see {@link BaseComponent.ComponentHooks}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div :class="containerClass" :style="style" v-bind="ptmi('root')" :data-p-severity="severity">
|
||||
<PVSButton
|
||||
type="button"
|
||||
:class="cx('button')"
|
||||
:class="cx('pcButton')"
|
||||
:label="label"
|
||||
:disabled="disabled"
|
||||
:severity="severity"
|
||||
|
@ -12,12 +12,12 @@
|
|||
:aria-label="label"
|
||||
@click="onDefaultButtonClick"
|
||||
v-bind="buttonProps"
|
||||
:pt="ptm('button')"
|
||||
:pt="ptm('pcButton')"
|
||||
:unstyled="unstyled"
|
||||
>
|
||||
<template v-if="$slots.icon" #icon="slotProps">
|
||||
<slot name="icon" :class="slotProps.class">
|
||||
<span :class="[icon, slotProps.class]" v-bind="ptm('button')['icon']" data-pc-section="buttonicon" />
|
||||
<span :class="[icon, slotProps.class]" v-bind="ptm('pcButton')['icon']" data-pc-section="buttonicon" />
|
||||
</slot>
|
||||
</template>
|
||||
<template #default>
|
||||
|
@ -27,7 +27,7 @@
|
|||
<PVSButton
|
||||
ref="button"
|
||||
type="button"
|
||||
:class="cx('dropdown')"
|
||||
:class="cx('pcDropdown')"
|
||||
:disabled="disabled"
|
||||
aria-haspopup="true"
|
||||
:aria-expanded="isExpanded"
|
||||
|
@ -40,16 +40,16 @@
|
|||
:size="size"
|
||||
:unstyled="unstyled"
|
||||
v-bind="menuButtonProps"
|
||||
:pt="ptm('dropdown')"
|
||||
:pt="ptm('pcDropdown')"
|
||||
>
|
||||
<template #icon="slotProps">
|
||||
<!--TODO: menubuttonicon and menuButtonIcon deprecated since v4.0-->
|
||||
<slot :name="$slots.dropdownicon ? 'dropdownicon' : 'menubuttonicon'" :class="slotProps.class">
|
||||
<component :is="menuButtonIcon || dropdownIcon ? 'span' : 'ChevronDownIcon'" :class="[dropdownIcon || menuButtonIcon, slotProps.class]" v-bind="ptm('dropdown')['icon']" data-pc-section="menubuttonicon" />
|
||||
<component :is="menuButtonIcon || dropdownIcon ? 'span' : 'ChevronDownIcon'" :class="[dropdownIcon || menuButtonIcon, slotProps.class]" v-bind="ptm('pcDropdown')['icon']" data-pc-section="menubuttonicon" />
|
||||
</slot>
|
||||
</template>
|
||||
</PVSButton>
|
||||
<PVSMenu ref="menu" :id="id + '_overlay'" :model="model" :popup="true" :autoZIndex="autoZIndex" :baseZIndex="baseZIndex" :appendTo="appendTo" :unstyled="unstyled" :pt="ptm('menu')">
|
||||
<PVSMenu ref="menu" :id="id + '_overlay'" :model="model" :popup="true" :autoZIndex="autoZIndex" :baseZIndex="baseZIndex" :appendTo="appendTo" :unstyled="unstyled" :pt="ptm('ptMenu')">
|
||||
<template v-if="$slots.menuitemicon" #itemicon="slotProps">
|
||||
<slot name="menuitemicon" :item="slotProps.item" :class="slotProps.class" />
|
||||
</template>
|
||||
|
|
|
@ -70,8 +70,8 @@ const theme = ({ dt }) => `
|
|||
|
||||
const classes = {
|
||||
root: 'p-splitbutton p-component',
|
||||
button: 'p-splitbutton-button',
|
||||
dropdown: 'p-splitbutton-dropdown'
|
||||
pcButton: 'p-splitbutton-button',
|
||||
pcDropdown: 'p-splitbutton-dropdown'
|
||||
};
|
||||
|
||||
export default BaseStyle.extend({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue