pull/4789/head
Cagatay Civici 2023-11-09 16:32:33 +03:00
commit a5a0ce75c8
3 changed files with 8 additions and 2 deletions

View File

@ -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'"

View File

@ -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[];
}

View File

@ -760,7 +760,7 @@
{
"name": "scope",
"optional": false,
"type": "{\n \t <span class=\"ml-3 text-primary-700\">index</span>: <span class=\"text-primary-500\">number</span>, <span class=\"text-primary-300\">// Index of the tab</span>\n \t <span class=\"ml-3 text-primary-700\">isTabActive</span>: <span class=\"text-primary-500\">(<span class=\"text-primary-700\">index</span>: number) &rArr; void</span>, <span class=\"text-primary-300\">// Whether the tab is active</span>\n}",
"type": "{\n \t <span class=\"ml-3 text-primary-700\">index</span>: <span class=\"text-primary-500\">number</span>, <span class=\"text-primary-300\">// Index of the tab</span>\n \t <span class=\"ml-3 text-primary-700 line-through\">isTabActive</span>: <span class=\"text-primary-500 line-through\">(<span class=\"text-primary-700\">index</span>: number) &rArr; void</span>, <span class=\"text-primary-300 line-through\">// Whether the tab is active</span>\n\t <span class=\"ml-3 text-primary-700\">active</span>: <span class=\"text-primary-500\">(<span class=\"text-primary-700\">index</span>: number) &rArr; void</span>, <span class=\"text-primary-300\">// Whether the tab is active</span>\n}",
"description": "header slot's params."
}
],