Update #3965 - Updates on Dialog components

pull/4030/head
Bahadır Sofuoğlu 2023-06-06 12:38:02 +03:00
parent 28d1c876e9
commit 5c47976d98
6 changed files with 8 additions and 12 deletions

View File

@ -6,9 +6,7 @@ const classes = {
icon: ({ instance }) => ['p-confirm-dialog-icon', instance.confirmation ? instance.confirmation.icon : null],
message: 'p-confirm-dialog-message',
rejectButton: ({ instance }) => ['p-confirm-dialog-reject', instance.confirmation ? instance.confirmation.rejectClass || 'p-button-text' : null],
rejectButtonIcon: ({ context }) => [context && context.icon, context && context.iconClass],
acceptButton: ({ instance }) => ['p-confirm-dialog-accept', instance.confirmation ? instance.confirmation.acceptClass : null],
acceptButtonIcon: ({ context }) => [context && context.icon, context && context.iconClass]
acceptButton: ({ instance }) => ['p-confirm-dialog-accept', instance.confirmation ? instance.confirmation.acceptClass : null]
};
export default {

View File

@ -26,14 +26,14 @@
<CDButton :label="rejectLabel" :class="cx('rejectButton')" iconPos="left" @click="reject()" :autofocus="autoFocusReject" :pt="ptm('rejectButton')">
<template #icon="iconProps">
<slot name="rejecticon">
<span :class="cx('rejectButtonIcon', getCXOptions(rejectIcon, iconProps))" v-bind="ptm('rejectButton')['icon']" />
<span :class="[rejectIcon, iconProps.class]" v-bind="ptm('rejectButton')['icon']" />
</slot>
</template>
</CDButton>
<CDButton :label="acceptLabel" :class="cx('acceptButton')" iconPos="left" @click="accept()" :autofocus="autoFocusAccept" :pt="ptm('acceptButton')">
<template #icon="iconProps">
<slot name="accepticon">
<span :class="cx('acceptButtonIcon', getCXOptions(acceptIcon, iconProps))" v-bind="ptm('acceptButton')['icon']" />
<span :class="[acceptIcon, iconProps.class]" v-bind="ptm('acceptButton')['icon']" />
</slot>
</template>
</CDButton>

View File

@ -87,9 +87,7 @@ const classes = {
message: 'p-confirm-popup-message',
footer: 'p-confirm-popup-footer',
rejectButton: ({ instance }) => ['p-confirm-dialog-reject', instance.confirmation ? instance.confirmation.rejectClass || 'p-button-text' : null],
rejectButtonIcon: ({ context }) => [context && context.icon, context && context.iconClass],
acceptButton: ({ instance }) => ['p-confirm-dialog-accept', instance.confirmation ? instance.confirmation.acceptClass : null],
acceptButtonIcon: ({ context }) => [context && context.icon, context && context.iconClass]
acceptButton: ({ instance }) => ['p-confirm-dialog-accept', instance.confirmation ? instance.confirmation.acceptClass : null]
};
const { load: loadStyle } = useStyle(styles, { id: 'primevue_confirmPopup_style', manual: true });

View File

@ -16,14 +16,14 @@
<CPButton :label="rejectLabel" @click="reject()" @keydown="onRejectKeydown" :autofocus="autoFocusReject" :class="cx('rejectButton')" :pt="ptm('rejectButton')">
<template #icon="iconProps">
<slot name="rejecticon">
<span :class="cx('rejectButtonIcon', getCXOptions(rejectIcon, iconProps))" v-bind="ptm('rejectButton')['icon']" />
<span :class="[rejectIcon, iconProps.class]" v-bind="ptm('rejectButton')['icon']" />
</slot>
</template>
</CPButton>
<CPButton :label="acceptLabel" @click="accept()" @keydown="onAcceptKeydown" :autofocus="autoFocusAccept" :class="cx('acceptButton')" :pt="ptm('acceptButton')">
<template #icon="iconProps">
<slot name="accepticon">
<span :class="cx('acceptButtonIcon', getCXOptions(acceptIcon, iconProps))" v-bind="ptm('acceptButton')['icon']" />
<span :class="[acceptIcon, iconProps.class]" v-bind="ptm('acceptButton')['icon']" />
</slot>
</template>
</CPButton>

View File

@ -199,7 +199,7 @@ const classes = {
maximizableIcon: ({ props, instance }) => `p-dialog-header-maximize-icon ${instance.maximized ? props.minimizeIcon : props.maximizeIcon}`,
closeButton: 'p-dialog-header-icon p-dialog-header-close p-link',
closeButtonIcon: ({ props }) => ['p-dialog-header-close-icon', props.closeIcon],
content: ({ props }) => ['p-dialog-content', props.contentClass],
content: 'p-dialog-content',
footer: 'p-dialog-footer'
};

View File

@ -30,7 +30,7 @@
</button>
</div>
</div>
<div :ref="contentRef" :class="cx('content')" :style="contentStyle" v-bind="{ ...contentProps, ...ptm('content') }">
<div :ref="contentRef" :class="[cx('content'), contentClass]" :style="contentStyle" v-bind="{ ...contentProps, ...ptm('content') }">
<slot></slot>
</div>
<div v-if="footer || $slots.footer" :ref="footerContainerRef" :class="cx('footer')" v-bind="ptm('footer')">