mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-24 23:13:59 +00:00
25 lines
670 B
JavaScript
Vendored
25 lines
670 B
JavaScript
Vendored
export default {
|
|
data() {
|
|
return {
|
|
activeTab: null,
|
|
displayedTabs: [],
|
|
};
|
|
},
|
|
methods: {
|
|
setActiveTab(event) {
|
|
const tabName = event.currentTarget.getAttribute('tab-name');
|
|
// console.log(`Tab "${tabName}" clicked`);
|
|
this.activeTab = tabName;
|
|
if (!this.displayedTabs.includes(tabName)) {
|
|
this.displayedTabs.push(tabName);
|
|
}
|
|
},
|
|
isActiveTab(tabName) {
|
|
return this.activeTab === tabName;
|
|
},
|
|
showTabContent(tabName) {
|
|
return this.displayedTabs.includes(tabName);
|
|
},
|
|
},
|
|
}
|