Fixed #3368 - TabMenu: First tab is always highlighted even when selected other tabs

pull/4452/head
Tuğçe Küçükoğlu 2023-08-14 18:18:43 +03:00
parent 4090ecf803
commit 9fcfeb1029
1 changed files with 1 additions and 9 deletions

View File

@ -72,12 +72,9 @@ export default {
index: index index: index
}); });
}, },
isActive(item) {
return this.activeRoute.startsWith(item.to);
},
getItemClass(item, index) { getItemClass(item, index) {
return ['p-tabmenuitem', item.class, { return ['p-tabmenuitem', item.class, {
'p-highlight': this.isActive(item) || this.d_activeIndex === index, 'p-highlight': this.d_activeIndex === index,
'p-disabled': this.disabled(item) 'p-disabled': this.disabled(item)
}]; }];
}, },
@ -118,11 +115,6 @@ export default {
} }
}, },
computed: {
activeRoute() {
return this.$route.path;
}
},
directives: { directives: {
'ripple': Ripple 'ripple': Ripple
} }