Browse Source

feat: ios白屏偶现

TIANYONG 6 months ago
parent
commit
cea1ce15bf
2 changed files with 11 additions and 0 deletions
  1. 1 0
      src/page-instrument/view-detail/index.module.less
  2. 10 0
      src/state.ts

+ 1 - 0
src/page-instrument/view-detail/index.module.less

@@ -142,6 +142,7 @@
 
     #osmdCanvasPage1 {
         //padding-bottom: 60px;
+        z-index: 1 !important;
     }
 }
 

+ 10 - 0
src/state.ts

@@ -628,6 +628,16 @@ export const customData = reactive({
 export const setStep = () => {
   // console.log('播放状态',state.playState)
   if (state.playState !== "play") {
+    // TODO:bug:11905,ios白屏偶现问题
+    if (storeData.isApp && (browserInfo.ios || browserInfo.iPhone) ) {
+      const osmdDom = document.getElementById('osmdCanvasPage1')
+      if (osmdDom) {
+        osmdDom.style.zIndex = '0';
+        requestAnimationFrame(() => {
+          osmdDom.style.zIndex = '1';
+        })
+      }
+    }
     console.log("暂停播放");
     return;
   }