diff --git a/api-generator/components/confirmdialog.js b/api-generator/components/confirmdialog.js index 310d06ab7..2d1c38d98 100644 --- a/api-generator/components/confirmdialog.js +++ b/api-generator/components/confirmdialog.js @@ -13,10 +13,18 @@ const ConfirmDialogProps = [ } ]; +const ConfirmDialogSlots = [ + { + name: "message", + description: "Custom content for the component." + } +]; + module.exports = { confirmdialog: { name: "ConfirmDialog", description: "ConfirmDialog uses a Dialog UI that is integrated with the Confirmation API.", - props: ConfirmDialogProps + props: ConfirmDialogProps, + slots: ConfirmDialogSlots } }; diff --git a/src/components/confirmdialog/ConfirmDialog.d.ts b/src/components/confirmdialog/ConfirmDialog.d.ts index 391217e49..f2131a330 100644 --- a/src/components/confirmdialog/ConfirmDialog.d.ts +++ b/src/components/confirmdialog/ConfirmDialog.d.ts @@ -1,4 +1,6 @@ +import { VNode } from 'vue'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; +import { ConfirmationOptions } from '../confirmationoptions'; export interface ConfirmDialogBreakpoints { /** @@ -32,6 +34,13 @@ export interface ConfirmDialogProps { } export interface ConfirmDialogSlots { + /** + * Custom message template. + * @param {Object} scope - message slot's params. + */ + message: (scope: { + message: ConfirmationOptions; + }) => VNode[]; } export declare type ConfirmDialogEmits = { diff --git a/src/views/confirmdialog/ConfirmDialogDoc.vue b/src/views/confirmdialog/ConfirmDialogDoc.vue index 03b68c9e5..e7651994a 100644 --- a/src/views/confirmdialog/ConfirmDialogDoc.vue +++ b/src/views/confirmdialog/ConfirmDialogDoc.vue @@ -278,7 +278,7 @@ export default { -
Slots
+
Slots