fix: 🐛 修复导航设置为混合模式时图标显示不正确的bug

修复导航设置为混合模式时图标显示不正确的bug
This commit is contained in:
Theo
2024-10-08 16:32:21 +08:00
parent 0783709ac7
commit d2b96ac74c

View File

@@ -15,10 +15,16 @@
:index="route.path"
>
<template #title>
<svg-icon
v-if="route.meta && route.meta.icon"
:icon-class="route.meta.icon"
/>
<template v-if="route.meta && route.meta.icon">
<el-icon
v-if="route.meta.icon.startsWith('el-icon')"
class="sub-el-icon"
>
<component :is="route.meta.icon.replace('el-icon-', '')" />
</el-icon>
<svg-icon v-else :icon-class="route.meta.icon" />
</template>
<svg-icon v-else icon-class="menu" />
<span v-if="route.path === '/'">首页</span>
<template v-else>
<span v-if="route.meta && route.meta.title" class="ml-1">