Browse Source

修复bug

SanHQin 1 day ago
parent
commit
91a25e5384
1 changed files with 1 additions and 8 deletions
  1. 1 8
      src/views/Student/components/choiceQuestionDetailDialog.vue

+ 1 - 8
src/views/Student/components/choiceQuestionDetailDialog.vue

@@ -339,6 +339,7 @@ const processWorkContent = async (content: string, toolType: number): Promise<an
                   item2.content.trim()
                 )
               ) {
+                item2.content = item2.content.replace(/&lt;/g, '<').replace(/&quot;/g, '"').replace(/&gt;/g, '>')
                 item2.content = md.render(item2.content)
               }
             })
@@ -415,18 +416,10 @@ const lookWorkData = computed(() => {
       (i: any) => i.id === lookWorkDetail.value
     )
 
-    _workFind.content.forEach((i:any) => {
-      i.messages.forEach((i2:any) => {
-        // 转字符  例如&lt; 》 <   &quot; 》 "  &gt; 》 >
-        i2.content = i2.content.replace(/&lt;/g, '<').replace(/&quot;/g, '"').replace(/&gt;/g, '>')
-      })
-    })
     if (_workFind) {
       _result = _workFind
     }
 
-
-    console.log(_workFind)
   }
 
   return _result