diff --git a/src/layout/navBars/topBar/index.vue b/src/layout/navBars/topBar/index.vue index 7d15558..433441d 100644 --- a/src/layout/navBars/topBar/index.vue +++ b/src/layout/navBars/topBar/index.vue @@ -1,19 +1,24 @@ diff --git a/src/layout/navMenu/horizontal.vue b/src/layout/navMenu/horizontal.vue index 5a9a7a1..3e3e940 100644 --- a/src/layout/navMenu/horizontal.vue +++ b/src/layout/navMenu/horizontal.vue @@ -15,12 +15,6 @@ {{ $t(val.meta.title) }} - @@ -113,8 +107,12 @@ const setSendClassicChildren = (path: string) => { } // 设置页面当前路由高亮 const setCurrentRouterHighlight = (currentRoute: RouteToFrom) => { + console.log('currentRoute', currentRoute) + const { path, meta } = currentRoute if (themeConfig.value.layout === 'classic') { + console.log('themeConfig.value.layout', themeConfig.value.layout) + let rootPath = getRootPath(path || '') rootPath = rootPath || path || '' state.defaultActive = `/${rootPath?.split('/')[1]}` @@ -135,6 +133,7 @@ onBeforeMount(() => { }) // 路由更新时 onBeforeRouteUpdate((to) => { + console.log('to', to) // 修复:https://gitee.com/lyt-top/vue-next-admin/issues/I3YX6G setCurrentRouterHighlight(to) // 修复经典布局开启切割菜单时,点击tagsView后左侧导航菜单数据不变的问题