Router doc updates

This commit is contained in:
Tuğçe Küçükoğlu 2023-09-01 14:02:08 +03:00
parent 10a7990499
commit 7cdedb794c
3 changed files with 14 additions and 14 deletions

View file

@ -7,7 +7,7 @@
</DocSectionText>
<div class="card relative z-2">
<Menubar :model="items">
<template #item="{ label, item, props, root }">
<template #item="{ label, item, props, root, hasSubmenu }">
<router-link v-if="item.route" v-slot="routerProps" :to="item.route" custom>
<a :href="routerProps.href" v-bind="props.action">
<span v-bind="props.icon" />
@ -17,7 +17,7 @@
<a v-else :href="item.url" :target="item.target" v-bind="props.action">
<span v-bind="props.icon" />
<span v-bind="props.label">{{ label }}</span>
<span :class="[root ? 'pi pi-fw pi-angle-down' : 'pi pi-fw pi-angle-right']" v-bind="props.submenuicon" />
<span :class="[hasSubmenu && (root ? 'pi pi-fw pi-angle-down' : 'pi pi-fw pi-angle-right')]" v-bind="props.submenuicon" />
</a>
</template>
</Menubar>