ソースを参照

Merge branch 'James'

James 4 年 前
コミット
8df2ae418b
1 ファイル変更7 行追加0 行削除
  1. 7 0
      src/App.vue

+ 7 - 0
src/App.vue

@@ -54,6 +54,13 @@
         sessionStorage.setItem("store", JSON.stringify(this.$store.state))
 
       })
+    },
+    mounted(){
+      window.addEventListener("onorientationchange" in window ? "orientationchange" : "resize",function() {
+        if (window.orientation === 90 || window.orientation === -90) {
+          alert("横屏可能导致页面异常,建议竖屏操作");
+        }
+      },false);
     }
 
   }