Parcourir la source

小屏幕默认收起侧边栏

lin_xin il y a 7 ans
Parent
commit
debd824a69
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      src/components/common/Header.vue

+ 5 - 0
src/components/common/Header.vue

@@ -100,6 +100,11 @@
                 }
                 this.fullscreen = !this.fullscreen;
             }
+        },
+        mounted(){
+            if(document.body.clientWidth < 1500){
+                this.collapseChage();
+            }
         }
     }
 </script>