From d47d051b193dc61c58ea5ddcf71e45a7d69b6537 Mon Sep 17 00:00:00 2001 From: Li Kui <90845831+likui628@users.noreply.github.com> Date: Tue, 27 Aug 2024 21:54:07 +0800 Subject: [PATCH] fix: search and menu buttons overlapped (#4249) --- packages/effects/layouts/src/basic/layout.vue | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/packages/effects/layouts/src/basic/layout.vue b/packages/effects/layouts/src/basic/layout.vue index af12deff..becf7aa0 100644 --- a/packages/effects/layouts/src/basic/layout.vue +++ b/packages/effects/layouts/src/basic/layout.vue @@ -78,23 +78,17 @@ const isMenuRounded = computed(() => { }); const logoCollapsed = computed(() => { - const shouldCollapse = isHeaderNav.value || isMixedNav.value; - - if (shouldCollapse) { + if (isMobile.value) { + return true; + } + if (isHeaderNav.value || isMixedNav.value) { return false; } - - const shouldExpandOnMobile = !sidebarCollapsed.value && isMobile.value; - - if (shouldExpandOnMobile) { - return false; - } - return sidebarCollapsed.value || isSideMixedNav.value; }); const showHeaderNav = computed(() => { - return isHeaderNav.value || isMixedNav.value; + return !isMobile.value && (isHeaderNav.value || isMixedNav.value); }); // 侧边多列菜单