Explorar el Código

再次兼容旧版答题点

zhangjie hace 3 años
padre
commit
416f662900
Se han modificado 1 ficheros con 9 adiciones y 0 borrados
  1. 9 0
      src/features/examwork/StudentExamDetail/spins/renderJSON.js

+ 9 - 0
src/features/examwork/StudentExamDetail/spins/renderJSON.js

@@ -48,6 +48,15 @@ function renderBlock(block, inline) {
   // let classList = node.classList
   let node;
   if (block.type === "text") {
+    // TODO:兼容旧版答题点
+    if (block.param && block.param.ntype && block.param.ntype === "cloze") {
+      node = document.createElement("img");
+      node.src = getAnswerPointImg(block.param.nval);
+      node.dataset.isAnswerPoint = true;
+      node.dataset.order = block.param.nval;
+      return node;
+    }
+
     if (
       block.param &&
       ["underline", "bold", "italic"].some((item) => block.param[item])