AppMenu and router link fixes
parent
6098674b05
commit
8d10e36cc8
|
@ -2,7 +2,7 @@
|
||||||
<DocSectionText v-bind="$attrs">
|
<DocSectionText v-bind="$attrs">
|
||||||
<p>
|
<p>
|
||||||
Unstyled mode instructs the components not to add any built-in style classes so that they can be styled using custom css or libraries like Tailwind, Bootstrap or PrimeFlex. Visit
|
Unstyled mode instructs the components not to add any built-in style classes so that they can be styled using custom css or libraries like Tailwind, Bootstrap or PrimeFlex. Visit
|
||||||
<NuxtLink to="/unstyled">Unstyled mode</NuxtLink> documentation for more information.
|
<NuxtLink to="/theming/unstyled">Unstyled mode</NuxtLink> documentation for more information.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<DocSectionCode :code="code" hideToggleCode importCode hideStackBlitz />
|
<DocSectionCode :code="code" hideToggleCode importCode hideStackBlitz />
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
<span>{{ menuitem.name }}</span>
|
<span>{{ menuitem.name }}</span>
|
||||||
<Tag v-if="menuitem.badge" :value="menuitem.badge"></Tag>
|
<Tag v-if="menuitem.badge" :value="menuitem.badge"></Tag>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<PrimeVueNuxtLink v-if="menuitem.to" :to="menuitem.to" :class="{ 'router-link-active': menuitem.to === $route.fullPath }">
|
<PrimeVueNuxtLink v-if="menuitem.to" :to="menuitem.to" :class="{ 'router-link-active': menuitem.to === $route.fullPath }">
|
||||||
<span v-if="menuitem.icon && root" class="menu-icon">
|
<span v-if="menuitem.icon && root" class="menu-icon">
|
||||||
<i :class="menuitem.icon"></i>
|
<i :class="menuitem.icon"></i>
|
||||||
|
@ -47,7 +48,8 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
isActiveRootmenuItem(menuitem) {
|
isActiveRootmenuItem(menuitem) {
|
||||||
return (
|
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}`)))
|
menuitem.children &&
|
||||||
|
!menuitem.children.some((item) => item.to === `/${this.$router.currentRoute.value?.name?.replaceAll('-', '/')}` || (item.children && item.children.some((it) => it.to === `/${this.$router.currentRoute.value.name}`)))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue