Browse Source

输入+录音 标点配置

natasha 1 year ago
parent
commit
b6f255b7bb

+ 3 - 3
src/components/Adult/preview/InputHasRecord.vue

@@ -73,7 +73,7 @@
                         ]"
                         >{{ items.detail.wordsList[indexCon + 1].pinyin }}</span
                       >
-                      <span class="hanzi content-con" :style="wordStyle(items.detail.wordsList[indexCon + 1].config)">{{
+                      <span class="hanzi content-con" :style="wordStyle(items.detail.resArr[indexCon + 1].config)">{{
                         items.detail.wordsList[indexCon + 1].chs
                       }}</span>
                       <span
@@ -242,7 +242,7 @@
                                 items.detail.wordsList[indexCon + 1].pinyin
                               }}</span
                             >
-                            <span class="hanzi content-con" :style="wordStyle(items.detail.wordsList[indexCon + 1].config)">{{
+                            <span class="hanzi content-con" :style="wordStyle(items.detail.resArr[indexCon + 1].config)">{{
                               items.detail.wordsList[indexCon + 1].chs
                             }}</span>
                             <span
@@ -395,7 +395,7 @@
                             items.detail.wordsList[indexCon + 1].pinyin
                           }}</span
                         >
-                        <span class="hanzi content-con" :style="wordStyle(items.detail.wordsList[indexCon + 1].config)">{{
+                        <span class="hanzi content-con" :style="wordStyle(items.detail.resArr[indexCon + 1].config)">{{
                           items.detail.wordsList[indexCon + 1].chs
                         }}</span>
                         <span

+ 8 - 3
src/components/Adult/preview/WordPhrase.vue

@@ -154,6 +154,7 @@
                 </div>
                 <span
                   class="NPC-word-tab-common NPC-word-tab-cixing"
+                  :class="[/[\u4E00-\u9FA5\uF900-\uFA2D]/.test(sItem.cixing) ? 'hasCn' : '']"
                   v-html="sItem.cixing"
                 ></span>
                 <span
@@ -195,6 +196,7 @@
                 </span>
                 <span
                   class="NPC-word-tab-common NPC-word-tab-cixing"
+                  :class="[/[\u4E00-\u9FA5\uF900-\uFA2D]/.test(sItem.cixing) ? 'hasCn' : '']"
                   v-html="sItem.cixing"
                 ></span>
                 <span
@@ -585,7 +587,7 @@ export default {
       }
       .NPC-word-tab-common {
         padding-left: 8px;
-        width: 120px;
+        width: 125px;
         box-sizing: border-box;
       }
       .NPC-word-tab-pinyin {
@@ -624,11 +626,14 @@ export default {
       .NPC-word-tab-cixing {
         font-family: "robot";
         // width: 48px;
-        min-width: 48px;
-        width: auto;
+        width: 60px;
+        word-break: break-word;
         box-sizing: border-box;
         text-align: left;
         font-style: italic;
+        &.hasCn{
+            font-size: 13px;
+        }
       }
       .NPC-word-tab-def {
         flex: 1;

+ 1 - 1
src/components/Adult/preview/components/WordPhraseDetail.vue

@@ -985,7 +985,7 @@ export default {
     // 去掉生词里的标点
     let new_word_str = ""
     for(let i = 0;i<this.data.new_word.length;i++){
-        if(this.punctuationList.indexOf(this.data.new_word[i])==-1){
+        if(/[\u4E00-\u9FA5\uF900-\uFA2D]/.test(this.data.new_word[i])){
             new_word_str+=this.data.new_word[i]
         }
     }