소스 검색

评卷后,回到顶部

Michael Wang 3 년 전
부모
커밋
4bcd35572d
1개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. 11 0
      src/features/mark/CommonMarkBody.vue

+ 11 - 0
src/features/mark/CommonMarkBody.vue

@@ -444,6 +444,17 @@ const renderPaperAndMark = async () => {
     } else {
       await processSplitConfig();
     }
+    await new Promise((res) => setTimeout(res, 700));
+    const container = <HTMLDivElement>(
+      document.querySelector(".mark-body-container")
+    );
+    addTimeout(() => {
+      container?.scrollTo({
+        top: 0,
+        left: 0,
+        behavior: "smooth",
+      });
+    }, 10);
   } catch (error) {
     sliceImagesWithTrackList.splice(0);
     console.trace("render error ", error);