移动端下切换路由时自动收起侧边栏导航

This commit is contained in:
hooray
2021-11-05 10:54:35 +08:00
parent 4a47d97c2d
commit 842314eace
+8
View File
@@ -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) {