2023-05-29 17:44:31 +00:00
|
|
|
<script>
|
|
|
|
import BaseComponent from 'primevue/basecomponent';
|
|
|
|
|
|
|
|
const classes = {
|
2023-05-29 20:18:28 +00:00
|
|
|
root: 'p-confirm-dialog',
|
2023-05-29 17:44:31 +00:00
|
|
|
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],
|
2023-06-06 09:38:02 +00:00
|
|
|
acceptButton: ({ instance }) => ['p-confirm-dialog-accept', instance.confirmation ? instance.confirmation.acceptClass : null]
|
2023-05-29 17:44:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'BaseConfirmDialog',
|
|
|
|
extends: BaseComponent,
|
|
|
|
props: {
|
|
|
|
group: String,
|
|
|
|
breakpoints: {
|
|
|
|
type: Object,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
draggable: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
css: {
|
|
|
|
classes
|
2023-05-30 12:28:04 +00:00
|
|
|
},
|
|
|
|
provide() {
|
|
|
|
return {
|
|
|
|
$parentInstance: this
|
|
|
|
};
|
2023-05-29 17:44:31 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|