From 91aa59a11a231f030a2673e700cc3a2827fc1bcf Mon Sep 17 00:00:00 2001 From: lanceJiang Date: Fri, 20 Sep 2024 18:29:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20layout.vue=20=E7=BB=84=E4=BB=B6=20?= =?UTF-8?q?=E5=9B=A0=20=E4=B8=BB=E9=A2=98sidebar-nav=20=E5=B8=83=E5=B1=80?= =?UTF-8?q?=20=E9=9A=90=E8=97=8F=20=E8=8F=9C=E5=8D=95=E5=90=8E=20=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=20=E4=B8=BA=20=E5=8F=8C=E5=88=97=E8=8F=9C=E5=8D=95sid?= =?UTF-8?q?ebar-mixed-nav=20=E6=89=BE=E4=B8=8D=E5=88=B0=E4=B8=BB=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=20&=20Header=20=E5=AE=BD=E5=BA=A6=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=20=E7=A9=BA=E7=99=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/effects/layouts/src/basic/layout.vue | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/effects/layouts/src/basic/layout.vue b/packages/effects/layouts/src/basic/layout.vue index fb58ba6c57c..28bd28a4794 100644 --- a/packages/effects/layouts/src/basic/layout.vue +++ b/packages/effects/layouts/src/basic/layout.vue @@ -143,6 +143,19 @@ watch( }, ); +watch( + () => preferences.app.layout, + async (val) => { + if (val === 'sidebar-mixed-nav' && preferences.sidebar.hidden) { + updatePreferences({ + sidebar: { + hidden: false, + }, + }); + } + }, +); + const slots = useSlots(); const headerSlots = computed(() => { return Object.keys(slots).filter((key) => key.startsWith('header-'));