From 61c72124383a2208c63592a8faf2d40da1c61217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Tue, 24 Oct 2023 15:44:47 +0300 Subject: [PATCH] Fixed #4679 - Accordion: new togglericon slot --- components/lib/accordion/Accordion.d.ts | 15 +++++++++++++++ components/lib/accordion/Accordion.vue | 1 + 2 files changed, 16 insertions(+) diff --git a/components/lib/accordion/Accordion.d.ts b/components/lib/accordion/Accordion.d.ts index 1a7390a04..d87521c89 100755 --- a/components/lib/accordion/Accordion.d.ts +++ b/components/lib/accordion/Accordion.d.ts @@ -174,6 +174,21 @@ export interface AccordionSlots { * Default slot to detect AccordionTab components. */ default(): VNode[]; + /** + * Custom toggler icon template. + * @param {Object} scope - togglericon slot's params. + */ + 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[]; } /** diff --git a/components/lib/accordion/Accordion.vue b/components/lib/accordion/Accordion.vue index d1bbd7e27..f22088372 100755 --- a/components/lib/accordion/Accordion.vue +++ b/components/lib/accordion/Accordion.vue @@ -21,6 +21,7 @@ v-bind="{ ...getTabProp(tab, 'headeractionprops'), ...getTabPT(tab, 'headeraction', i) }" > +