fix: 菜单设置默认icon

Former-commit-id: b5a562a43a3fb0ceb1355644c3e2be8af75f83bf
This commit is contained in:
april
2023-09-08 14:33:02 +08:00
parent 383c48931b
commit ca6cd8d59b

View File

@@ -90,9 +90,13 @@ function resolvePath(routePath: string) {
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)"> <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
<el-menu-item :index="resolvePath(onlyOneChild.path)"> <el-menu-item :index="resolvePath(onlyOneChild.path)">
<svg-icon <svg-icon
v-if="onlyOneChild.meta && onlyOneChild.meta.icon" :icon-class="
:icon-class="onlyOneChild.meta.icon" onlyOneChild.meta && onlyOneChild.meta.icon
? onlyOneChild.meta.icon
: 'menu'
"
/> />
<template #title> <template #title>
{{ translateRouteTitleI18n(onlyOneChild.meta.title) }} {{ translateRouteTitleI18n(onlyOneChild.meta.title) }}
</template> </template>