|
|
@@ -20,6 +20,7 @@
|
|
|
:paragraph-list="li.paragraph_list"
|
|
|
:rich-text-list="li.rich_text_list"
|
|
|
:pinyin-position="data.property.pinyin_position"
|
|
|
+ :body-styles="getBodyStyles()"
|
|
|
:is-preview="true"
|
|
|
/>
|
|
|
<span v-else :key="`text-${i}`" class="html-content" v-html="renderTextBlockContent(li)"></span>
|
|
|
@@ -109,10 +110,10 @@
|
|
|
<div v-if="showLang" class="lang">
|
|
|
{{ data.multilingual.find((item) => item.type === getLang())?.translation }}
|
|
|
</div>
|
|
|
+ <PreviewOperation @showAnswerAnalysis="showAnswerAnalysis" @judgeCorrect="judgeCorrect" @retry="retry" />
|
|
|
</div>
|
|
|
|
|
|
<WriteDialog :visible.sync="writeVisible" @confirm="handleWriteConfirm" />
|
|
|
- <PreviewOperation @showAnswerAnalysis="showAnswerAnalysis" @judgeCorrect="judgeCorrect" @retry="retry" />
|
|
|
<AnswerCorrect
|
|
|
:visible.sync="visibleAnswerCorrect"
|
|
|
:is-check-correct="isCheckCorrect"
|
|
|
@@ -477,6 +478,23 @@ export default {
|
|
|
|
|
|
this.$set(this.inputWidthMap, mark, nextWidth);
|
|
|
},
|
|
|
+ getBodyStyles() {
|
|
|
+ const styles = {};
|
|
|
+ const unifiedAttrib = this.data?.unified_attrib || {};
|
|
|
+
|
|
|
+ // 从统一属性中获取样式
|
|
|
+ if (unifiedAttrib.font) {
|
|
|
+ styles['font-family'] = unifiedAttrib.font;
|
|
|
+ }
|
|
|
+ if (unifiedAttrib.font_size) {
|
|
|
+ styles['font-size'] = unifiedAttrib.font_size;
|
|
|
+ }
|
|
|
+ if (unifiedAttrib.text_color) {
|
|
|
+ styles['color'] = unifiedAttrib.text_color;
|
|
|
+ }
|
|
|
+
|
|
|
+ return styles;
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|