Browse Source

句子听+朗读 字体

natasha 2 years ago
parent
commit
04c982da4c

+ 6 - 3
src/components/Adult/common/SegwordConfig.vue

@@ -8,7 +8,8 @@
         type != 'sentence_segtemp_chs' &&
         type != 'sort_chs' &&
         type != 'CourseStart_chs' &&
-        type != 'ligature_chs'
+        type != 'ligature_chs' && 
+        type != 'sentence_listen_read_chs'
       "
       style="margin-top: 10px"
     >
@@ -31,7 +32,8 @@
         type != 'sentence_segtemp_chs' &&
         type != 'sort_chs' &&
         type != 'CourseStart_chs' &&
-        type != 'ligature_chs'
+        type != 'ligature_chs' && 
+        type != 'sentence_listen_read_chs'
       "
     >
       <span class="adult-book-lable">字体:</span>
@@ -82,7 +84,8 @@
         v-if="
           type != 'sort_chs' &&
           type != 'CourseStart_chs' &&
-          type != 'ligature_chs'
+          type != 'ligature_chs'&& 
+          type != 'sentence_listen_read_chs'
         "
       >
         <template slot-scope="scope">

+ 13 - 4
src/components/Adult/preview/SentenceListenRead.vue

@@ -41,7 +41,7 @@
             <p
               :class="[
                 'content-con',
-                /^[\u4e00-\u9fa5]/.test(items.detail.sentence) ? '' : 'hasPy',
+                items.font?items.font:/^[\u4e00-\u9fa5]/.test(items.detail.sentence) ? '' : 'hasPy',
               ]"
               v-if="items.detail.sentence"
             >
@@ -72,9 +72,10 @@
                         :class="[
                           noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : '',
                         ]"
+                        v-if="itemCon.pinyin"
                         >{{ itemCon.pinyin }}</span
                       >
-                      <span class="hanzi content-con">{{ itemCon.chs }}</span>
+                      <span class="hanzi content-con" :class="[itemCon.fontFamily]">{{ itemCon.chs }}</span>
                     </div>
                     <div style="text-align: left">
                       <span
@@ -86,9 +87,10 @@
                             ? 'noFont'
                             : '',
                         ]"
+                        v-if="items.detail.wordsList[indexCon + 1].pinyin"
                         >{{ items.detail.wordsList[indexCon + 1].pinyin }}</span
                       >
-                      <span class="hanzi content-con">{{
+                      <span class="hanzi content-con" :class="[items.detail.wordsList[indexCon + 1].fontFamily]">{{
                         items.detail.wordsList[indexCon + 1].chs
                       }}</span>
                     </div>
@@ -100,9 +102,10 @@
                     :class="[
                       noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : '',
                     ]"
+                    v-if="itemCon.pinyin"
                     >{{ itemCon.pinyin }}</span
                   >
-                  <span class="hanzi content-con">{{ itemCon.chs }}</span>
+                  <span class="hanzi content-con" :class="[itemCon.fontFamily]">{{ itemCon.chs }}</span>
                 </template>
               </div>
             </div>
@@ -270,6 +273,12 @@ export default {
           color: #000000;
           font-family: "FZJCGFKTK";
           margin: 0;
+          &.en{
+            font-family: "robot";
+          }
+          &.py{
+            font-family: "GB-PINYINOK-B";
+          }
           &.hasPy {
             font-family: "GB-PINYINOK-B";
           }