Browse Source

再次兼容旧版答题点

zhangjie 3 năm trước cách đây
mục cha
commit
416f662900

+ 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])