Przeglądaj źródła

答题点显示bug

zhangjie 3 lat temu
rodzic
commit
b60e08280c

+ 18 - 0
src/features/examwork/StudentExamDetail/spins/RichText.vue

@@ -29,3 +29,21 @@ export default {
   methods: {},
 };
 </script>
+
+<style lang="scss">
+.rich-text {
+  img[data-is-answer-point] {
+    max-width: 100%;
+    max-height: 16px;
+    display: inline-block;
+    vertical-align: text-top;
+  }
+  audio {
+    height: 20px;
+    display: inline-block;
+    vertical-align: top;
+    margin-left: 5px;
+    margin-right: 5px;
+  }
+}
+</style>

+ 2 - 2
src/features/examwork/StudentExamDetail/spins/renderJSON.js

@@ -83,8 +83,8 @@ function renderBlock(block, inline) {
     }
 
     // TODO: 兼容旧版填空题答题点做的修改,后续可以删除
-    if (block.param && block.param.display) {
-      node.style.display = block.param.display;
+    if (block.param && block.param.display === "none") {
+      node = document.createTextNode("");
     }
   } else if (block.type === "image") {
     node = document.createElement("img");