From 15c4d029de194db901587ddcdfc22a0135fb51ef Mon Sep 17 00:00:00 2001 From: mertsincan Date: Mon, 29 May 2023 16:38:17 +0100 Subject: [PATCH] Refactor #4000 - Update context option of pt in AccordionTab --- components/lib/accordion/Accordion.vue | 3 ++- components/lib/accordiontab/AccordionTab.d.ts | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/components/lib/accordion/Accordion.vue b/components/lib/accordion/Accordion.vue index 1aa48c834..d0aff5b0e 100755 --- a/components/lib/accordion/Accordion.vue +++ b/components/lib/accordion/Accordion.vue @@ -106,7 +106,8 @@ export default { index, count, first: index === 0, - last: index === count - 1 + last: index === count - 1, + active: this.isTabActive(index) } }; diff --git a/components/lib/accordiontab/AccordionTab.d.ts b/components/lib/accordiontab/AccordionTab.d.ts index 92db103b3..0fbd5a96c 100755 --- a/components/lib/accordiontab/AccordionTab.d.ts +++ b/components/lib/accordiontab/AccordionTab.d.ts @@ -135,6 +135,10 @@ export interface AccordionTabContext { * Whether the tab is last. */ last: boolean; + /** + * Whether the tab is active. + */ + active: boolean; } /**