Add missing isActive method

pull/5039/head
tugcekucukoglu 2023-11-20 21:03:00 +03:00
parent 52f5c5a09a
commit 6ac123cac1
1 changed files with 8 additions and 0 deletions

View File

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