diff --git a/api-generator/components/accordion.js b/api-generator/components/accordion.js index fcb5e10c3..12faee510 100644 --- a/api-generator/components/accordion.js +++ b/api-generator/components/accordion.js @@ -106,11 +106,27 @@ const AccordionEvents = [ } ]; +const AccordioneSlots = [ + { + name: 'default', + description: 'Custom template.' + }, + { + name: 'collapseicon', + description: 'Custom collapse icon template.' + }, + { + name: 'expandicon', + description: 'Custom expand icon template.' + } +]; + module.exports = { accordion: { name: 'Accordion', description: 'Accordion groups a collection of contents in tabs.', props: AccordionProps, - events: AccordionEvents + events: AccordionEvents, + slots: AccordioneSlots } }; diff --git a/components/lib/accordion/Accordion.d.ts b/components/lib/accordion/Accordion.d.ts index d87521c89..b27c2667b 100755 --- a/components/lib/accordion/Accordion.d.ts +++ b/components/lib/accordion/Accordion.d.ts @@ -175,20 +175,13 @@ export interface AccordionSlots { */ default(): VNode[]; /** - * Custom toggler icon template. - * @param {Object} scope - togglericon slot's params. + * Custom collapse icon template. */ - togglericon(scope: { - /** - * Current index of the tab - */ - index: number; - /** - * Whether the current tab is active - * @param {number} index - Current index of the tab - */ - isTabActive: (index: number) => void; - }): VNode[]; + collapseicon(): VNode[]; + /** + * Custom expand icon template. + */ + expandicon(): VNode[]; } /** diff --git a/components/lib/accordion/Accordion.vue b/components/lib/accordion/Accordion.vue index f22088372..f7903594e 100755 --- a/components/lib/accordion/Accordion.vue +++ b/components/lib/accordion/Accordion.vue @@ -21,9 +21,14 @@ v-bind="{ ...getTabProp(tab, 'headeractionprops'), ...getTabPT(tab, 'headeraction', i) }" > - -