From c469512bd4e83fe890f3d745c04788181b74c408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E8=8F=9C=E7=99=BD=E7=8E=89=E6=B1=A4?= <79054161+Azir-11@users.noreply.github.com> Date: Mon, 22 Jul 2024 11:39:19 +0800 Subject: [PATCH] fix(projects): fix the issue of abnormal width of the sidebar in the top menu mix and reverse mode (#562) --- src/layouts/base-layout/index.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/layouts/base-layout/index.vue b/src/layouts/base-layout/index.vue index 7d00da22..7debe5d1 100644 --- a/src/layouts/base-layout/index.vue +++ b/src/layouts/base-layout/index.vue @@ -85,8 +85,13 @@ function getSiderWidth() { } function getSiderCollapsedWidth() { + const { reverseHorizontalMix } = themeStore.layout; const { collapsedWidth, mixCollapsedWidth, mixChildMenuWidth } = themeStore.sider; + if (isHorizontalMix.value && reverseHorizontalMix) { + return isActiveFirstLevelMenuHasChildren.value ? collapsedWidth : 0; + } + let w = isVerticalMix.value || isHorizontalMix.value ? mixCollapsedWidth : collapsedWidth; if (isVerticalMix.value && appStore.mixSiderFixed && childLevelMenus.value.length) {