From ae3f7cb909714b1dc0541d13033c373896b60bed Mon Sep 17 00:00:00 2001 From: Netfan Date: Sun, 1 Dec 2024 21:37:36 +0800 Subject: [PATCH] fix: mixed menu layout in full content mode (#4990) --- .../@core/ui-kit/layout-ui/src/components/layout-sidebar.vue | 5 ++++- packages/@core/ui-kit/layout-ui/src/vben-layout.vue | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/@core/ui-kit/layout-ui/src/components/layout-sidebar.vue b/packages/@core/ui-kit/layout-ui/src/components/layout-sidebar.vue index 3d196d27..5f7fe3bf 100644 --- a/packages/@core/ui-kit/layout-ui/src/components/layout-sidebar.vue +++ b/packages/@core/ui-kit/layout-ui/src/components/layout-sidebar.vue @@ -191,7 +191,10 @@ watchEffect(() => { function calcMenuWidthStyle(isHiddenDom: boolean): CSSProperties { const { extraWidth, fixedExtra, isSidebarMixed, show, width } = props; - let widthValue = `${width + (isSidebarMixed && fixedExtra && extraVisible.value ? extraWidth : 0)}px`; + let widthValue = + width === 0 + ? '0px' + : `${width + (isSidebarMixed && fixedExtra && extraVisible.value ? extraWidth : 0)}px`; const { collapseWidth } = props; diff --git a/packages/@core/ui-kit/layout-ui/src/vben-layout.vue b/packages/@core/ui-kit/layout-ui/src/vben-layout.vue index 8fa233f6..3cdd3d1e 100644 --- a/packages/@core/ui-kit/layout-ui/src/vben-layout.vue +++ b/packages/@core/ui-kit/layout-ui/src/vben-layout.vue @@ -192,7 +192,7 @@ const headerFixed = computed(() => { }); const showSidebar = computed(() => { - return isSideMode.value && sidebarEnable.value; + return isSideMode.value && sidebarEnable.value && !props.sidebarHidden; }); /**