瀏覽代碼

调整窗口大小比较

Michael Wang 3 年之前
父節點
當前提交
296ec239e7
共有 1 個文件被更改,包括 16 次插入10 次删除
  1. 16 10
      src/features/OnlineExam/Examing/ExamingHome.vue

+ 16 - 10
src/features/OnlineExam/Examing/ExamingHome.vue

@@ -466,20 +466,26 @@ export default {
         action: "答题页面dimension",
         scrollX: window.scrollX,
         scrollY: window.scrollY,
-        screenY: window.screen.availHeight,
+        width: window.screen.width,
+        height: window.screen.height,
         screenX: window.screen.availWidth,
-        clientHeight: document.documentElement.clientHeight,
+        screenY: window.screen.availHeight,
         clientWidth: document.documentElement.clientWidth,
-        windowHeight: window.outerHeight,
-        windowWidth: window.outerWidth,
-        equal:
-          "dimesion" +
-          (document.documentElement.clientHeight === window.outerHeight &&
-            document.documentElement.clientWidth === window.outerWidth),
+        clientHeight: document.documentElement.clientHeight,
+        windowInnerWidth: window.innerWidth,
+        windowInnerHeight: window.innerHeight,
+        windowOuterWidth: window.outerWidth,
+        windowOuterHeight: window.outerHeight,
+        // 是否全屏
+        equal1:
+          "dimesion1" +
+          (window.screen.width === window.outerWidth &&
+            window.screen.height === window.outerHeight),
+        // 是否打开了调试窗口
         equal2:
           "dimesion2" +
-          (window.screen.availHeight === window.outerHeight &&
-            window.screen.availWidth === window.outerWidth),
+          (window.innerWidth === window.outerWidth &&
+            window.innerHeight === window.outerHeight),
       });
 
       exam.WEIXIN_ANSWER_ENABLED = weixinAnswerEnabled;