From 842314eaced799daccda6657a18e8785999b888f Mon Sep 17 00:00:00 2001 From: hooray <304327508@qq.com> Date: Fri, 5 Nov 2021 10:54:35 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E4=B8=8B=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E8=B7=AF=E7=94=B1=E6=97=B6=E8=87=AA=E5=8A=A8=E6=94=B6?= =?UTF-8?q?=E8=B5=B7=E4=BE=A7=E8=BE=B9=E6=A0=8F=E5=AF=BC=E8=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/index.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/layout/index.vue b/src/layout/index.vue index 70e7531e..cf8315cc 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -55,6 +55,14 @@ watch(() => store.state.settings.sidebarCollapse, val => { } }) +watch(() => routeInfo.path, () => { + if (store.state.settings.mode === 'mobile') { + store.commit('settings/updateThemeSetting', { + sidebarCollapse: true + }) + } +}) + onMounted(() => { proxy.$hotkeys('f5', e => { if (store.state.settings.enablePageReload) {