Explorar o código

Merge branch 'master' of http://git.qmth.com.cn/ExamCloud-3/examcloud-admin-web

lideyin %!s(int64=5) %!d(string=hai) anos
pai
achega
545c75222e
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      src/modules/questions/views/EditPaper.vue

+ 6 - 0
src/modules/questions/views/EditPaper.vue

@@ -876,6 +876,8 @@ export default {
     },
     //初始化试卷
     initPaper() {
+      const scrollPosition =
+        document.documentElement.scrollTop || document.body.scrollTop;
       this.loading = true;
       this.paper = {
         course: {
@@ -922,6 +924,10 @@ export default {
             }
           }
         }
+        setTimeout(() => {
+          document.documentElement.scrollTop = document.body.scrollTop = scrollPosition;
+          console.log(scrollPosition);
+        }, 1000);
         this.loading = false;
       });
     },