feat: 添加header 滚动条分割

This commit is contained in:
Mr.April
2026-04-17 15:13:38 +08:00
parent ecedab030b
commit 5f1b1c279d
7 changed files with 230 additions and 13 deletions
+8 -1
View File
@@ -1,6 +1,6 @@
<template>
<el-menu :default-active="state.activeMenu" @select="onSelect">
<MenuSub :menus="systemStore.navMenu" :show-icon="showIcon" @menu-click="$emit('menu-click')" />
<MenuSub :menus="systemStore.navMenu" :show-icon="showIcon" @menu-click="$emit('menu-click')" :key="navMenuKey" />
</el-menu>
</template>
@@ -34,6 +34,13 @@ const state = reactive({
switchingLanguage: false,
})
// 调试用:检查 navMenu 中是否有消息中心
const navMenuKey = computed(() => {
const hasNotify = systemStore.navMenu?.some((m: Menus) => m.name === '消息中心' || m.path === '/notify')
console.log('[Menu] navMenu has 消息中心:', hasNotify, 'menus:', systemStore.navMenu?.map((m: Menus) => m.name))
return hasNotify ? 'with-notify' : 'no-notify'
})
const setActiveMenu = (route: RouteLocationNormalizedLoaded) => {
if (route.path == '/') return (state.activeMenu = 'index')