Fix #4506
parent
aca8d3ecf7
commit
c823d392dd
|
@ -86,8 +86,8 @@ const classes = {
|
||||||
icon: ({ instance }) => ['p-confirm-popup-icon', instance.confirmation ? instance.confirmation.icon : null],
|
icon: ({ instance }) => ['p-confirm-popup-icon', instance.confirmation ? instance.confirmation.icon : null],
|
||||||
message: 'p-confirm-popup-message',
|
message: 'p-confirm-popup-message',
|
||||||
footer: 'p-confirm-popup-footer',
|
footer: 'p-confirm-popup-footer',
|
||||||
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: ({ instance }) => ['p-confirm-dialog-accept', instance.confirmation ? instance.confirmation.acceptClass : null]
|
acceptButton: 'p-confirm-dialog-accept'
|
||||||
};
|
};
|
||||||
|
|
||||||
const { load: loadStyle } = useStyle(styles, { name: 'confirmpopup', manual: true });
|
const { load: loadStyle } = useStyle(styles, { name: 'confirmpopup', manual: true });
|
||||||
|
|
|
@ -15,14 +15,14 @@
|
||||||
</template>
|
</template>
|
||||||
<component v-else :is="$slots.message" :message="confirmation"></component>
|
<component v-else :is="$slots.message" :message="confirmation"></component>
|
||||||
<div :class="cx('footer')" v-bind="ptm('footer')">
|
<div :class="cx('footer')" v-bind="ptm('footer')">
|
||||||
<CPButton :label="rejectLabel" @click="reject()" @keydown="onRejectKeydown" :autofocus="autoFocusReject" :class="cx('rejectButton')" :unstyled="unstyled" :pt="ptm('rejectButton')" data-pc-name="rejectbutton">
|
<CPButton :label="rejectLabel" @click="reject()" @keydown="onRejectKeydown" :autofocus="autoFocusReject" :class="[cx('rejectButton'), confirmation.rejectClass]" :unstyled="unstyled" :pt="ptm('rejectButton')" data-pc-name="rejectbutton">
|
||||||
<template v-if="rejectIcon || $slots.rejecticon" #icon="iconProps">
|
<template v-if="rejectIcon || $slots.rejecticon" #icon="iconProps">
|
||||||
<slot name="rejecticon">
|
<slot name="rejecticon">
|
||||||
<span :class="[rejectIcon, iconProps.class]" v-bind="ptm('rejectButton')['icon']" data-pc-name="rejectbuttonicon" />
|
<span :class="[rejectIcon, iconProps.class]" v-bind="ptm('rejectButton')['icon']" data-pc-name="rejectbuttonicon" />
|
||||||
</slot>
|
</slot>
|
||||||
</template>
|
</template>
|
||||||
</CPButton>
|
</CPButton>
|
||||||
<CPButton :label="acceptLabel" @click="accept()" @keydown="onAcceptKeydown" :autofocus="autoFocusAccept" :class="cx('acceptButton')" :unstyled="unstyled" :pt="ptm('acceptButton')" data-pc-name="acceptbutton">
|
<CPButton :label="acceptLabel" @click="accept()" @keydown="onAcceptKeydown" :autofocus="autoFocusAccept" :class="[cx('acceptButton'), confirmation.acceptClass]" :unstyled="unstyled" :pt="ptm('acceptButton')" data-pc-name="acceptbutton">
|
||||||
<template v-if="acceptIcon || $slots.accepticon" #icon="iconProps">
|
<template v-if="acceptIcon || $slots.accepticon" #icon="iconProps">
|
||||||
<slot name="accepticon">
|
<slot name="accepticon">
|
||||||
<span :class="[acceptIcon, iconProps.class]" v-bind="ptm('acceptButton')['icon']" data-pc-name="acceptbuttonicon" />
|
<span :class="[acceptIcon, iconProps.class]" v-bind="ptm('acceptButton')['icon']" data-pc-name="acceptbuttonicon" />
|
||||||
|
|
Loading…
Reference in New Issue