fix: corregir renderizado de iconos SVG en NavBar
- Reemplazar :prepend-icon por slot #prepend para soportar iconos mdi y SVG - Los items con trytonIcon (SVG importado) ahora se renderizan como <img> - Los items con mdi-* se renderizan como <v-icon>
This commit is contained in:
@@ -57,9 +57,13 @@
|
||||
v-for="item in menuItems"
|
||||
:key="item.title"
|
||||
:title="item.title"
|
||||
:prepend-icon="item.icon"
|
||||
@click="navigate(item.route)"
|
||||
></v-list-item>
|
||||
>
|
||||
<template #prepend>
|
||||
<v-icon v-if="typeof item.icon === 'string'">{{ item.icon }}</v-icon>
|
||||
<img v-else :src="item.icon" width="20" height="20" />
|
||||
</template>
|
||||
</v-list-item>
|
||||
<v-list-item prepend-icon="mdi-cog" title="Administracion" @click="toggleAdminMenu()" v-if="isAuthenticated && isAdmin"></v-list-item>
|
||||
<v-list-item v-if="isAuthenticated && isAdmin && showAdminMenu">
|
||||
<v-list>
|
||||
@@ -67,9 +71,13 @@
|
||||
v-for="item in menuAdminItems"
|
||||
:key="item.title"
|
||||
:title="item.title"
|
||||
:prepend-icon="item.icon"
|
||||
@click="navigateAdmin(item.route)"
|
||||
></v-list-item>
|
||||
>
|
||||
<template #prepend>
|
||||
<v-icon v-if="typeof item.icon === 'string'">{{ item.icon }}</v-icon>
|
||||
<img v-else :src="item.icon" width="20" height="20" />
|
||||
</template>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
|
||||
Reference in New Issue
Block a user