6👍
✅
You can emit event to parent
showFirstTabFunc () {
this.$emit('setActiveTab', 'showFirstTab')
}
In Parent
<app-tabs @setActiveTab="setActiveTab"></app-tabs>
methods: {
setActiveTab (activeTab) {
this.showFirstTab = false
this.showSecondTab = false
this.showThirdTab = false
this.showTabFour = false
this[activeTab] = true
}
}
Source:stackexchange.com