diff --git a/api-generator/components/sidebar.js b/api-generator/components/sidebar.js index 6d8ee73d4..d942aa12d 100644 --- a/api-generator/components/sidebar.js +++ b/api-generator/components/sidebar.js @@ -96,6 +96,10 @@ const SidebarSlots = [ { name: 'closeicon', description: 'Custom close icon template.' + }, + { + name: 'container', + description: 'Custom container template.' } ]; diff --git a/components/lib/sidebar/Sidebar.d.ts b/components/lib/sidebar/Sidebar.d.ts index 2fb7e9e45..993f05820 100755 --- a/components/lib/sidebar/Sidebar.d.ts +++ b/components/lib/sidebar/Sidebar.d.ts @@ -188,6 +188,16 @@ export interface SidebarSlots { */ class: any; }): VNode[]; + /** + * Custom container slot. + * @param {Object} scope - container slot's params. + */ + container(scope: { + /** + * Close sidebar function. + */ + onClose: () => void; + }): VNode[]; } /** diff --git a/components/lib/sidebar/Sidebar.vue b/components/lib/sidebar/Sidebar.vue index 4fb3874f1..3babd17bc 100755 --- a/components/lib/sidebar/Sidebar.vue +++ b/components/lib/sidebar/Sidebar.vue @@ -3,19 +3,22 @@