From 1b228bc6e18555e68e0a8a7f1251c6894f938691 Mon Sep 17 00:00:00 2001 From: april Date: Tue, 15 Aug 2023 15:47:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=9B=91=E5=90=ACactivetop=E5=88=A4?= =?UTF-8?q?=E6=96=ADlayout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 3b7237dff95897e71c7598e3b30731ceb6832625 --- src/layout/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layout/index.vue b/src/layout/index.vue index 6debf4a2..0dc27562 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -11,7 +11,6 @@ import { usePermissionStore } from "@/store/modules/permission"; import { useRouter } from "vue-router"; const permissionStore = usePermissionStore(); const { width } = useWindowSize(); - /** * 响应式布局容器固定宽度 * @@ -30,9 +29,11 @@ const activeTopMenu = computed(() => { // 混合模式左侧菜单 const mixLeftMenu = ref([]); const router = useRouter(); +const layout = computed(() => settingsStore.layout); watch( () => activeTopMenu.value, (newVal) => { + if (layout.value !== "mix") return; permissionStore.routes.forEach((item) => { if (item.path === newVal) { mixLeftMenu.value = item.children || []; @@ -49,7 +50,6 @@ watch( immediate: true, } ); -const layout = computed(() => settingsStore.layout); const classObj = computed(() => ({ hideSidebar: !appStore.sidebar.opened,