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

This commit is contained in:
pixelmaxQM
2025-04-21 23:49:38 +08:00
parent 54595d46e5
commit 5e35fcea58

View File

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