diff --git a/api-generator/components/dialog.js b/api-generator/components/dialog.js index 96efd0501..268c457e4 100644 --- a/api-generator/components/dialog.js +++ b/api-generator/components/dialog.js @@ -215,6 +215,10 @@ const DialogSlots = [ { name: 'maximizeicon', description: 'Custom maximizeicon icon template of dialog.' + }, + { + name: 'container', + description: 'Custom container template.' } ]; diff --git a/api-generator/components/toast.js b/api-generator/components/toast.js index 055a5a200..679266540 100644 --- a/api-generator/components/toast.js +++ b/api-generator/components/toast.js @@ -80,6 +80,10 @@ const ToastSlots = [ { name: 'closeicon', description: 'Custom close icon template.' + }, + { + name: 'container', + description: 'Custom container template.' } ]; diff --git a/components/lib/dialog/Dialog.d.ts b/components/lib/dialog/Dialog.d.ts index 98190f8aa..2a553f8e9 100755 --- a/components/lib/dialog/Dialog.d.ts +++ b/components/lib/dialog/Dialog.d.ts @@ -332,6 +332,21 @@ export interface DialogSlots { */ class: any; }): VNode[]; + /** + * Custom container slot. + * @param {Object} scope - container slot's params. + */ + container(scope: { + /** + * Close dialog function. + */ + onClose: () => void; + /** + * Maximize/minimize dialog function. + * @param {Event} event - Browser event + */ + onMaximize: (event: Event) => void; + }): VNode[]; } /** diff --git a/components/lib/dialog/Dialog.vue b/components/lib/dialog/Dialog.vue index 4885f3646..fcb1e826d 100755 --- a/components/lib/dialog/Dialog.vue +++ b/components/lib/dialog/Dialog.vue @@ -3,51 +3,54 @@
-
- - {{ header }} - -
- - + +
diff --git a/components/lib/toast/Toast.d.ts b/components/lib/toast/Toast.d.ts index 0a1124d0b..e040ed875 100755 --- a/components/lib/toast/Toast.d.ts +++ b/components/lib/toast/Toast.d.ts @@ -289,6 +289,20 @@ export interface ToastSlots { */ class: any; }): VNode[]; + /** + * Custom container slot. + * @param {Object} scope - container slot's params. + */ + container(scope: { + /** + * Message of the component + */ + message: any; + /** + * Close toast function + */ + onClose: () => void; + }): VNode[]; } /** diff --git a/components/lib/toast/ToastMessage.vue b/components/lib/toast/ToastMessage.vue index 00a298cb8..b47de3f9b 100755 --- a/components/lib/toast/ToastMessage.vue +++ b/components/lib/toast/ToastMessage.vue @@ -1,6 +1,7 @@