瀏覽代碼

再次兼容旧版答题点

zhangjie 3 年之前
父節點
當前提交
416f662900
共有 1 個文件被更改,包括 9 次插入0 次删除
  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])