瀏覽代碼

fix: 尝试修复代码显示问题

Azure 2 年之前
父節點
當前提交
bc646adece
共有 1 個文件被更改,包括 7 次插入9 次删除
  1. 7 9
      src/utils/index.ts

+ 7 - 9
src/utils/index.ts

@@ -286,14 +286,14 @@ export function getQuestion(examId: string, studentId: string) {
                 hide()
                 if (response.err === 0) {
                     const question = response.res;
-                    let editableImage: {
-                            [key: string]: string} = {},
-                        nextEditable: {
-                            [key: string]: string} = {},
-                        nextUnEditable: {
-                            [key: string]: string} = {}
-                    ;
                     question.codeList.forEach((code:NestedCodeItemVO) => {
+                        let editableImage: {
+                                [key: string]: string} = {},
+                            nextEditable: {
+                                [key: string]: string} = {},
+                            nextUnEditable: {
+                                [key: string]: string} = {}
+                        ;
                         if (code.editable) {
                             for (let key in code.editable){
                                 if (isImage(key)) {
@@ -303,8 +303,6 @@ export function getQuestion(examId: string, studentId: string) {
                                 }
                             }
                         }
-                    })
-                    question.codeList.forEach((code: NestedCodeItemVO) => {
                         if (code.editable){
                             code.editable = nextEditable;
                         }