Browse Source

范文换行

natasha 4 months ago
parent
commit
d96ac96d1d

+ 1 - 1
src/views/exercise_questions/preview/WritePictruePreview.vue

@@ -130,7 +130,7 @@ export default {
         };
         this.answer.answer_list.push(obj);
       }
-      this.show_sample_break = this.data.sample_text ? this.data.sample_text.replace(/\\/g, '</p><p>') : '';
+      this.show_sample_break = this.data.sample_text ? this.data.sample_text.replace(/#/g, '</p><p>') : '';
     },
     changeImg(index) {
       this.active_index = index;

+ 1 - 1
src/views/exercise_questions/preview/WritePreview.vue

@@ -90,7 +90,7 @@ export default {
     data: {
       handler(val) {
         if (!val || this.data.type !== 'write') return;
-        this.show_sample_break = val.sample_text ? val.sample_text.replace(/\\/g, '</p><p>') : '';
+        this.show_sample_break = val.sample_text ? val.sample_text.replace(/#/g, '</p><p>') : '';
       },
       deep: true,
       immediate: true,