Skip to content

Commit

Permalink
fix(menu.vue): 🐛 菜单列表未适配el-icon导致图标不显示问题修复
Browse files Browse the repository at this point in the history
  • Loading branch information
haoxianrui committed Jun 11, 2024
1 parent 01d82a2 commit e72b683
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/views/system/menu/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,19 @@
>
<el-table-column label="菜单名称" min-width="200">
<template #default="scope">
<svg-icon :icon-class="scope.row.icon" />
<template
v-if="scope.row.icon && scope.row.icon.startsWith('el-icon')"
>
<el-icon style="vertical-align: -0.15em">
<component :is="scope.row.icon.replace('el-icon-', '')" />
</el-icon>
</template>
<template v-else-if="scope.row.icon">
<svg-icon :icon-class="scope.row.icon" />
</template>
<template v-else>
<svg-icon icon-class="menu" />
</template>
{{ scope.row.name }}
</template>
</el-table-column>
Expand Down

0 comments on commit e72b683

Please sign in to comment.