James 4 anni fa
parent
commit
f6be90a4f5
1 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  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);
     }
 
   }