Skip to content

Commit

Permalink
Add missing isActive method
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Nov 20, 2023
1 parent 52f5c5a commit 6ac123c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/tabmenu/TabMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -115,6 +118,11 @@ export default {
}
},
computed: {
activeRoute() {
return this.$route.path;
}
},
directives: {
'ripple': Ripple
}
Expand Down

0 comments on commit 6ac123c

Please sign in to comment.