소스 검색

ifram事件处理

liushengqiang 2 년 전
부모
커밋
f37968a9ea
1개의 변경된 파일1개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 5
      src/views/coursewarePlay/index.tsx

+ 1 - 5
src/views/coursewarePlay/index.tsx

@@ -274,14 +274,10 @@ export default defineComponent({
       } catch (error) {}
     }
 
-    const iframTime = ref()
     // ifram事件处理
     const iframeHandle = (ev: MessageEvent) => {
       if (ev.data?.api === 'headerTogge') {
-        clearTimeout(iframTime.value)
-        iframTime.value = setTimeout(() => {
-          activeData.model = ev.data.show || (ev.data.playState == 'play' ? false : true)
-        }, 500)
+        activeData.model = ev.data.show || (ev.data.playState == 'play' ? false : true)
       }
     }