zhangjie 2 rokov pred
rodič
commit
060cf4dc81

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 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: [] };

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov