natasha před 2 roky
rodič
revize
6da6420d90
1 změnil soubory, kde provedl 12 přidání a 4 odebrání
  1. 12 4
      src/components/Adult/Preview.vue

+ 12 - 4
src/components/Adult/Preview.vue

@@ -54,9 +54,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="[/^[0-9]*$/.test(itemCon.chs)]?/^[\u4e00-\u9fa5]/.test(itemCon.chs)?'hanzi':'en':''">{{ itemCon.chs }}</span>
                     </div>
                     <div
                       v-if="item.detail.wordsList[indexCon + 1]"
@@ -71,9 +72,10 @@
                             ? 'noFont'
                             : '',
                         ]"
+                        v-if="item.detail.wordsList[indexCon + 1].pinyin"
                         >{{ item.detail.wordsList[indexCon + 1].pinyin }}</span
                       >
-                      <span class="hanzi content-con">{{
+                      <span class="hanzi content-con" :class="[/^[0-9]*$/.test(item.detail.wordsList[indexCon + 1].chs)]?/^[\u4e00-\u9fa5]/.test(item.detail.wordsList[indexCon + 1].chs)?'hanzi':'en':''">{{
                         item.detail.wordsList[indexCon + 1].chs
                       }}</span>
                     </div>
@@ -95,12 +97,13 @@
                           item.detail.wordsList[indexCon - 1].chs
                         ) == -1 &&
                         chsFhList.indexOf(itemCon.chs) > -1
-                      )
+                      ) &&
+                      itemCon.pinyin
                     "
                     >{{ itemCon.pinyin }}</span
                   >
                   <span
-                    class="hanzi content-con"
+                    class="content-con"
                     v-if="
                       item.detail &&
                       !(
@@ -113,6 +116,7 @@
                         chsFhList.indexOf(itemCon.chs) > -1
                       )
                     "
+                    :class="[/^[0-9]*$/.test(itemCon.chs)]?/^[\u4e00-\u9fa5]/.test(itemCon.chs)?'hanzi':'en':''"
                     >{{ itemCon.chs }}</span
                   >
                 </template>
@@ -1460,6 +1464,9 @@ export default {
         &.hanzi {
           font-family: "FZJCGFKTK";
         }
+        &.en{
+          font-family: "robot";
+        }
       }
       .content-en {
         font-weight: normal;
@@ -1477,6 +1484,7 @@ export default {
         display: flex;
         flex-flow: wrap;
         justify-content: center;
+        align-items: flex-end;
         .con-item {
           text-align: center;
           padding: 0 1px;