diff --git a/components/lib/accordion/Accordion.vue b/components/lib/accordion/Accordion.vue index f7903594e..601382f12 100755 --- a/components/lib/accordion/Accordion.vue +++ b/components/lib/accordion/Accordion.vue @@ -20,7 +20,7 @@ @keydown="onTabKeyDown($event, tab, i)" v-bind="{ ...getTabProp(tab, 'headeractionprops'), ...getTabPT(tab, 'headeraction', i) }" > - <component v-if="tab.children && tab.children.headericon" :is="tab.children.headericon" :isTabActive="isTabActive(i)" :index="i"></component> + <component v-if="tab.children && tab.children.headericon" :is="tab.children.headericon" :isTabActive="isTabActive(i)" :active="isTabActive(i)" :index="i"></component> <component v-else-if="isTabActive(i)" :is="$slots.collapseicon ? $slots.collapseicon : collapseIcon ? 'span' : 'ChevronDownIcon'" diff --git a/components/lib/accordiontab/AccordionTab.d.ts b/components/lib/accordiontab/AccordionTab.d.ts index 87398dcdb..e7c54415a 100755 --- a/components/lib/accordiontab/AccordionTab.d.ts +++ b/components/lib/accordiontab/AccordionTab.d.ts @@ -194,8 +194,14 @@ export interface AccordionTabSlots { /** * Whether the tab is active * @param {number} index - Index of the tab + * @deprecated since v3.40.0. Use 'active' property instead. */ isTabActive: (index: number) => void; + /** + * Whether the tab is active + * @param {number} index - Index of the tab + */ + active: (index: number) => void; }): VNode[]; }