Преглед на файлове

生词评分详情拼音内容加上拼音字体html

natasha преди 1 седмица
родител
ревизия
6a76f4bc1f

+ 2 - 1
src/views/book/courseware/preview/common/RecordScoreWholeDetail.vue

@@ -76,7 +76,8 @@
       <div class="top" :style="wordScoreItem(items.score_total)">
         <span v-if="showIndex">第{{ indexs + 1 }}{{ itemUnit }}</span>
         <p>
-          {{ items.text_new_word || items.text }}<i v-if="items.position" class="position">{{ items.position }}</i>
+          <span v-html="items.text_new_word || items.text"></span
+          ><i v-if="items.position" class="position" v-html="items.position"></i>
         </p>
         <template v-if="items.detail_list">
           <b :style="textColor(items.score_total)">{{ items.score_total }}</b>

+ 6 - 3
src/views/book/courseware/preview/components/new_word/NewWordPreview.vue

@@ -2409,7 +2409,7 @@ export default {
       }
       let singleText =
         item.new_word +
-        (item.pinyin ? ' · ' + item.pinyin : '') +
+        (item.pinyin ? ' · <span style="font-family:League">' + item.pinyin + '</span>' : '') +
         (item.cixing ? ' · ' + item.cixing : '') +
         (item.def_str ? ' · ' + item.def_str : '');
       this.$set(scoreObj, 'singleText', singleText);
@@ -2495,11 +2495,14 @@ export default {
         });
       });
       score.forEach((item, indexs) => {
-        this.$set(item, 'position', this.data.new_word_list[indexs].pinyin);
+        this.$set(item, 'position', '<span style="font-family:League">' + this.data.new_word_list[indexs].pinyin) +
+          '</span>';
         this.$set(item, 'text_new_word', '「' + this.data.new_word_list[indexs].new_word + '」');
         let singleText =
           this.data.new_word_list[indexs].new_word +
-          (this.data.new_word_list[indexs].pinyin ? ' · ' + this.data.new_word_list[indexs].pinyin : '') +
+          (this.data.new_word_list[indexs].pinyin
+            ? ' · <span style="font-family:League">' + this.data.new_word_list[indexs].pinyin + '</span>'
+            : '') +
           (this.data.new_word_list[indexs].cixing ? ' · ' + this.data.new_word_list[indexs].cixing : '') +
           (this.data.new_word_list[indexs].def_str ? ' · ' + this.data.new_word_list[indexs].def_str : '');
         this.$set(item, 'singleText', singleText);