Fixed #4000 - Update context option of pt in AccordionTab

pull/4004/head
mertsincan 2023-05-29 14:38:47 +01:00
parent 77812ed971
commit 7e8f8a7c7c
2 changed files with 17 additions and 1 deletions

View File

@ -95,6 +95,7 @@ export default {
return `${this.id}_${index}_content`;
},
getTabPT(tab, key, index) {
const count = this.tabs.length;
const tabMetaData = {
props: tab.props,
parent: {
@ -102,7 +103,10 @@ export default {
state: this.$data
},
context: {
index
index,
count,
first: index === 0,
last: index === count - 1
}
};

View File

@ -123,6 +123,18 @@ export interface AccordionTabContext {
* Current index of the tab.
*/
index: number;
/**
* Count of tabs
*/
count: number;
/**
* Whether the tab is first.
*/
first: boolean;
/**
* Whether the tab is last.
*/
last: boolean;
}
/**