zhangjie 2 년 전
부모
커밋
060cf4dc81
2개의 변경된 파일23개의 추가작업 그리고 0개의 파일을 삭제
  1. 12 0
      public/paper.html
  2. 11 0
      src/modules/question/components/QuestionImportEdit.vue

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 12 - 0
public/paper.html


+ 11 - 0
src/modules/question/components/QuestionImportEdit.vue

@@ -174,6 +174,7 @@ export default {
       // this.paperRichJson = deepCopy(paperRichTextJson);
       this.paperRichJson = deepCopy(this.data.richText);
       this.paperData = deepCopy(this.data.detailInfo);
+      this.transformRichImg();
       this.questionKey = randomCode();
     },
     async getCourseProperty() {
@@ -184,6 +185,16 @@ export default {
         JSON.stringify({ optionList, courseId: this.data.importData.courseId })
       );
     },
+    transformRichImg() {
+      const rate = 96 / 200;
+      this.paperRichJson.sections.forEach((section) => {
+        section.blocks.forEach((block) => {
+          if (block.type !== "image" || !block.param) return;
+          block.param.width = block.param.width * rate;
+          block.param.height = block.param.height * rate;
+        });
+      });
+    },
     initData() {
       this.paperData = [];
       this.paperRichJson = { sections: [] };

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.