diff --git a/api-generator/components/message.js b/api-generator/components/message.js index ba69199a6..68f553418 100644 --- a/api-generator/components/message.js +++ b/api-generator/components/message.js @@ -57,6 +57,10 @@ const MessageSlots = [ { name: 'closeicon', description: 'Custom close icon template.' + }, + { + name: 'container', + description: 'Custom container template.' } ]; diff --git a/components/lib/message/Message.d.ts b/components/lib/message/Message.d.ts index f47444eff..0944aab4b 100755 --- a/components/lib/message/Message.d.ts +++ b/components/lib/message/Message.d.ts @@ -188,6 +188,16 @@ export interface MessageSlots { */ class: any; }): VNode[]; + /** + * Custom container slot. + * @param {Object} scope - container slot's params. + */ + container(scope: { + /** + * Close message function. + */ + onClose: () => void; + }): VNode[]; } /** diff --git a/components/lib/message/Message.vue b/components/lib/message/Message.vue index b76d3010f..3c59ce59d 100755 --- a/components/lib/message/Message.vue +++ b/components/lib/message/Message.vue @@ -1,7 +1,8 @@