fix: 修复菜单无ICON的展示问题

This commit is contained in:
pixelmaxQM 2025-04-21 23:49:38 +08:00
parent 54595d46e5
commit 5e35fcea58
1 changed files with 5 additions and 1 deletions

View File

@ -9,7 +9,7 @@
<component :is="routerInfo.meta.icon" />
</el-icon>
<template v-else>
{{ routerInfo.meta.title[0] }}
{{ isCollapse ? routerInfo.meta.title[0] : "" }}
</template>
<template #title>
{{ routerInfo.meta.title }}
@ -37,6 +37,10 @@ import {computed, inject} from 'vue'
}
})
const isCollapse = inject('isCollapse', {
default: false
})
const sideHeight = computed(() => {
return config.value.layout_side_item_height + 'px'
})