From 3b51a9dcccef93185e4f5619c4fdd3aed8f18aaf Mon Sep 17 00:00:00 2001 From: ray <1490493387@qq.com> Date: Fri, 21 Feb 2025 13:56:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20:bug:=20=E4=BF=AE=E5=A4=8D=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E8=AE=BE=E5=A4=87=E6=89=93=E5=BC=80=E4=BE=A7?= =?UTF-8?q?=E8=BE=B9=E6=A0=8F=E4=B8=BB=E5=86=85=E5=AE=B9=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E5=B7=A6=E8=BE=B9=E8=B7=9D=E8=AE=BE=E7=BD=AE=E6=97=A0=E6=95=88?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/index.vue | 47 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/src/layout/index.vue b/src/layout/index.vue index 52c1376e..3d641186 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -261,7 +261,7 @@ function handleToggleSidebar() { &.layout-mix { .layout__sidebar { - width: 100% !important; + width: 100%; } .layout__container { @@ -272,33 +272,34 @@ function handleToggleSidebar() { } } -.layout-left.hideSidebar { - .layout__sidebar { - width: $sidebar-width-collapsed !important; - } - - .layout__main { - margin-left: $sidebar-width-collapsed; - } - - &.mobile { +.layout-left { + &.hideSidebar { .layout__sidebar { - pointer-events: none; - transform: translate3d(-$sidebar-width, 0, 0); - transition-duration: 0.3s; + width: $sidebar-width-collapsed; } .layout__main { - margin-left: 0; + margin-left: $sidebar-width-collapsed; + } + + &.mobile { + .layout__sidebar { + pointer-events: none; + transform: translate3d(-$sidebar-width, 0, 0); + transition-duration: 0.3s; + } + + .layout__main { + margin-left: 0; + } + } + } + &.openSidebar { + &.mobile { + .layout__main { + margin-left: 0; + } } } } - -.mobile { - .layout-mix, - .layout-top, - .layout-left { - margin-left: 0; - } -}