Fixed #4000 - Update context option of pt in AccordionTab
parent
77812ed971
commit
7e8f8a7c7c
|
@ -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
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue