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" :index="route.path"
> >
<template #title> <template #title>
<svg-icon <template v-if="route.meta && route.meta.icon">
v-if="route.meta && route.meta.icon" <el-icon
:icon-class="route.meta.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> <span v-if="route.path === '/'">首页</span>
<template v-else> <template v-else>
<span v-if="route.meta && route.meta.title" class="ml-1"> <span v-if="route.meta && route.meta.title" class="ml-1">