Fixed #5028 - ConfirmDialog & ConfirmPopup: icon option class pt implementation defect

pull/5029/head
tugcekucukoglu 2024-01-04 11:24:27 +03:00
parent aa5336fbbd
commit 13323511fb
4 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@
<template v-if="!$slots.message"> <template v-if="!$slots.message">
<slot name="icon"> <slot name="icon">
<component v-if="$slots.icon" :is="$slots.icon" :class="cx('icon')" /> <component v-if="$slots.icon" :is="$slots.icon" :class="cx('icon')" />
<span v-else-if="confirmation.icon" :class="cx('icon')" v-bind="ptm('icon')" /> <span v-else-if="confirmation.icon" :class="[confirmation.icon, cx('icon')]" v-bind="ptm('icon')" />
</slot> </slot>
<span :class="cx('message')" v-bind="ptm('message')">{{ message }}</span> <span :class="cx('message')" v-bind="ptm('message')">{{ message }}</span>
</template> </template>

View File

@ -2,7 +2,7 @@ import BaseStyle from 'primevue/base/style';
const classes = { const classes = {
root: 'p-confirm-dialog', root: 'p-confirm-dialog',
icon: ({ instance }) => ['p-confirm-dialog-icon', instance.confirmation ? instance.confirmation.icon : null], icon: 'p-confirm-dialog-icon',
message: 'p-confirm-dialog-message', message: 'p-confirm-dialog-message',
rejectButton: ({ instance }) => ['p-confirm-dialog-reject', instance.confirmation && !instance.confirmation.rejectClass ? 'p-button-text' : null], rejectButton: ({ instance }) => ['p-confirm-dialog-reject', instance.confirmation && !instance.confirmation.rejectClass ? 'p-button-text' : null],
acceptButton: 'p-confirm-dialog-accept' acceptButton: 'p-confirm-dialog-accept'

View File

@ -8,7 +8,7 @@
<div :class="cx('content')" v-bind="ptm('content')"> <div :class="cx('content')" v-bind="ptm('content')">
<slot name="icon"> <slot name="icon">
<component v-if="$slots.icon" :is="$slots.icon" :class="cx('icon')" /> <component v-if="$slots.icon" :is="$slots.icon" :class="cx('icon')" />
<span v-else-if="confirmation.icon" :class="cx('icon')" v-bind="ptm('icon')" /> <span v-else-if="confirmation.icon" :class="[confirmation.icon, cx('icon')]" v-bind="ptm('icon')" />
</slot> </slot>
<span :class="cx('message')" v-bind="ptm('message')">{{ confirmation.message }}</span> <span :class="cx('message')" v-bind="ptm('message')">{{ confirmation.message }}</span>
</div> </div>

View File

@ -83,7 +83,7 @@ const classes = {
} }
], ],
content: 'p-confirm-popup-content', content: 'p-confirm-popup-content',
icon: ({ instance }) => ['p-confirm-popup-icon', instance.confirmation ? instance.confirmation.icon : null], icon: 'p-confirm-popup-icon',
message: 'p-confirm-popup-message', message: 'p-confirm-popup-message',
footer: 'p-confirm-popup-footer', footer: 'p-confirm-popup-footer',
rejectButton: ({ instance }) => ['p-confirm-popup-reject', instance.confirmation && !instance.confirmation.rejectClass ? 'p-button-sm p-button-text' : null], rejectButton: ({ instance }) => ['p-confirm-popup-reject', instance.confirmation && !instance.confirmation.rejectClass ? 'p-button-sm p-button-text' : null],