Sfoglia il codice sorgente

Merge branch 'online' into jenkins

lex 1 anno fa
parent
commit
35a3127fee
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      src/views/attend-class/component/tools/pen.tsx

+ 3 - 3
src/views/attend-class/component/tools/pen.tsx

@@ -26,6 +26,7 @@ export default defineComponent({
   setup(props) {
     const { show, type } = toRefs(props);
     // const modelAttendStatus = ref(false);
+    const penIframeRefId = `penIframeRef${+new Date()}`;
     const modal = reactive({
       status: false,
       title: type.value === 'pen' ? '退出批注' : '退出白板',
@@ -53,16 +54,15 @@ export default defineComponent({
         ]}>
         <iframe
           class={styles.iframe}
-          id="penIframeRef"
+          id={penIframeRefId}
           frameborder="0"
           width="100vw"
           height="100vh"
           src={src}
           onLoad={() => {
             firstRender.value = false;
-
             if (props.type === 'call') {
-              const iframeRef: any = document.getElementById('penIframeRef');
+              const iframeRef: any = document.getElementById(penIframeRefId);
               if (iframeRef && iframeRef.contentWindow.renderData) {
                 iframeRef.contentWindow.renderData(props.callStudents);
               }