Browse Source

当屏幕分辨率宽度低于1920时,自动折叠菜单

ZaiZai 2 years ago
parent
commit
36ba54e112
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/App.vue

+ 6 - 1
src/App.vue

@@ -28,7 +28,12 @@ watch(() => [
 
 nextTick(()=> {
     setUserTheme(appStore.getThemeVal, appStore.getColor)
-    ulog('客户端 启动成功', '当前开发版本 v' + config?.version)
+    ulog('档案管理 启动成功', '当前开发版本 v' + config?.version)
+    //当屏幕分辨率宽度低于1920时,自动折叠菜单
+    const width = document.body.clientWidth
+    if (width < 1920) {
+        appStore.setCollapse(true)
+    }
 })
 
 //设置主题