Browse Source

更新切换时显示

lex 1 year ago
parent
commit
f62690f460
1 changed files with 13 additions and 0 deletions
  1. 13 0
      src/views/attend-class/index.tsx

+ 13 - 0
src/views/attend-class/index.tsx

@@ -1031,13 +1031,26 @@ export default defineComponent({
       // console.log(e, 'e');
       if (e.code === 'ArrowUp') {
         // if (popupData.activeIndex === 0) return;
+        setModalOpen();
         handlePreAndNext('up');
       } else if (e.code === 'ArrowDown') {
         // if (popupData.activeIndex === data.itemList.length - 1) return;
+        setModalOpen();
         handlePreAndNext('down');
       }
     });
 
+    const setModalOpen = (status = true) => {
+      clearTimeout(activeData.timer);
+      activeData.model = status;
+      Object.values(data.videoRefs).map((n: any) =>
+        n?.toggleHideControl(status)
+      );
+      Object.values(data.audioRefs).map((n: any) =>
+        n?.toggleHideControl(status)
+      );
+    };
+
     /** 教学数据 */
     const studyData = reactive({
       type: '' as ToolType,