Explorar el Código

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

Azure hace 2 años
padre
commit
bc646adece
Se han modificado 1 ficheros con 7 adiciones y 9 borrados
  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;
                         }