Nested routes check added

pull/5002/head
tugcekucukoglu 2023-12-25 13:59:01 +03:00
parent 69f692e1d3
commit 067654c6c4
1 changed files with 3 additions and 1 deletions

View File

@ -46,7 +46,9 @@ export default {
}, },
methods: { methods: {
isActiveRootmenuItem(menuitem) { isActiveRootmenuItem(menuitem) {
return menuitem.children && !menuitem.children.some((item) => item.to === `/${this.$router.currentRoute.value.name}` || (item.children && item.children.some((it) => it.to === `/${this.$router.currentRoute.value.name}`))); return (
menuitem.children && !menuitem.children.some((item) => item.to === `/${this.$router.currentRoute.value?.name?.replace('-', '/')}` || (item.children && item.children.some((it) => it.to === `/${this.$router.currentRoute.value.name}`)))
);
} }
} }
}; };