Przeglądaj źródła

Merge branch 'startLogin'

mo 1 rok temu
rodzic
commit
6ffc31a75b
2 zmienionych plików z 37 dodań i 0 usunięć
  1. 1 0
      src/components/layout/index.tsx
  2. 36 0
      src/views/attend-class/index.tsx

+ 1 - 0
src/components/layout/index.tsx

@@ -347,6 +347,7 @@ export default defineComponent({
 
         // boxBoundaryInfo.isBoundary = true;
         // boxBoundaryInfo.isBoundaryType= 'right'
+        NPopoverRef.value.setShow(false)
 
         setTimeout(()=>{
 

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

@@ -363,7 +363,43 @@ export default defineComponent({
       initBoundaryWrap(subdEl, boxBoundaryInfo);
       window.addEventListener('message', iframeHandle);
       getDetail();
+      window.addEventListener("resize", resetSize);
     });
+
+    const resetSize = ()=>{
+      const subdEl = document.getElementById(`moveNPopover`) as HTMLDivElement;
+      subdEl.style.display = 'none'
+      // const boxBoundaryInfo = reactive({
+      //   isBoundary: true,
+      //   isBoundaryType: 'right' as any,
+      //   mainWidth: '' as any,
+      //   mainHeight: '' as any,
+      //   subWidth: '' as any,
+      //   subHeight: '' as any
+      // });
+
+
+        // boxBoundaryInfo.isBoundary = true;
+        // boxBoundaryInfo.isBoundaryType= 'right'
+        NPopoverRef.value.setShow(false)
+
+        setTimeout(()=>{
+
+          subdEl.style.transition = ''
+          initBoxRectInfo(subdEl, boxBoundaryInfo);
+          initBoundaryWrap(subdEl, boxBoundaryInfo);
+          console.log('resize')
+          subdEl.style.display = 'block'
+        },100)
+
+
+
+
+
+    }
+    onUnmounted(()=>{
+      window.removeEventListener("resize", resetSize);
+    })
     const initBoundaryWrap = (target: any, wrapInfo: any) => {
       target.addEventListener('mouseenter', () => {
         if (wrapInfo.isBoundary) {