Ver código fonte

课文标点不取词

natasha 1 ano atrás
pai
commit
42c48e7a08

+ 21 - 0
src/components/Adult/Preview.vue

@@ -1105,6 +1105,27 @@ export default {
         {
           touxiang: "#FAFF00",
           bg: "#FEFFCC"
+        },
+
+        {
+          touxiang: "#94C748",
+          bg: "rgba(148, 199, 72, 0.1)"
+        },
+        {
+          touxiang: "#E2B203",
+          bg: "rgba(226, 178, 3, 0.1)"
+        },
+        {
+          touxiang: "rgba(108, 195, 224, 1)",
+          bg: "rgba(108, 195, 224, 0.1)"
+        },
+        {
+          touxiang: "rgba(159, 143, 239, 1)",
+          bg: "rgba(159, 143, 239, 0.1)"
+        },
+        {
+          touxiang: "rgba(231, 116, 187, 1)",
+          bg: "rgba(231, 116, 187, 0.1)"
         }
       ],
       chsFhList: [",", "。", "“", ":", "》", "?", "!", ";"],

+ 34 - 6
src/components/Adult/preview/ArticleViewChs/WordModelChs.vue

@@ -74,7 +74,6 @@
                       : 'textCenter',
                     pItem.chs == '“' ? 'textRight' : ''
                   ]"
-                  @click="showWordDetail($event, pItem)"
                 >
                   <template v-if="!pItem.width">
                     <template v-if="pItem.isShow">
@@ -86,7 +85,10 @@
                               -1
                         "
                       >
-                        <span class="NNPE-words-box">
+                        <span
+                          class="NNPE-words-box"
+                          @click="showWordDetail($event, pItem)"
+                        >
                           <span
                             v-if="
                               curQue.pyPosition == 'top' &&
@@ -133,7 +135,12 @@
                             >{{ pItem.pinyin }}</span
                           >
                         </span>
-                        <span class="NNPE-words-box">
+                        <span
+                          class="NNPE-words-box"
+                          @click="
+                            showWordDetail($event, item.wordsList[pIndex + 1])
+                          "
+                        >
                           <span
                             v-if="
                               curQue.pyPosition == 'top' &&
@@ -188,6 +195,9 @@
                                 item.wordsList[pIndex + 2].chs
                               ) > -1
                           "
+                          @click="
+                            showWordDetail($event, item.wordsList[pIndex + 2])
+                          "
                         >
                           <span
                             v-if="
@@ -362,7 +372,6 @@
                     : 'textCenter',
                   pItem.chs == '“' ? 'textRight' : ''
                 ]"
-                @click="showWordDetail($event, pItem)"
               >
                 <template v-if="!pItem.width">
                   <template v-if="pItem.isShow">
@@ -373,7 +382,10 @@
                           chsFhList.indexOf(item.sentArr[pIndex + 1].chs) > -1
                       "
                     >
-                      <span class="NNPE-words-box">
+                      <span
+                        class="NNPE-words-box"
+                        @click="showWordDetail($event, pItem)"
+                      >
                         <template v-if="curQue.pyPosition == 'top'">
                           <span
                             v-if="config.isShowPY"
@@ -422,7 +434,12 @@
                           >
                         </template>
                       </span>
-                      <span class="NNPE-words-box">
+                      <span
+                        class="NNPE-words-box"
+                        @click="
+                          showWordDetail($event, item.sentArr[pIndex + 1])
+                        "
+                      >
                         <template v-if="curQue.pyPosition == 'top'">
                           <span
                             v-if="config.isShowPY"
@@ -478,6 +495,9 @@
                             item.sentArr[pIndex + 2].chs &&
                             chsFhList.indexOf(item.sentArr[pIndex + 2].chs) > -1
                         "
+                        @click="
+                          showWordDetail($event, item.sentArr[pIndex + 2])
+                        "
                       >
                         <template v-if="curQue.pyPosition == 'top'">
                           <span
@@ -953,6 +973,14 @@ export default {
     },
     showWordDetail(e, item) {
       let _this = this;
+      if (
+        this.chsFhList.indexOf(item.chs) > -1 ||
+        item.chs == "“" ||
+        item.chs == "(" ||
+        /^[a-zA-Z0-9]/.test(item.chs)
+      ) {
+        return false;
+      }
       if (_this.oldHz != item.chs) {
         this.isShow = false;
         setTimeout(() => {

+ 2 - 1
src/components/Adult/preview/DialogueArticleViewChs/WordModelChs.vue

@@ -739,7 +739,8 @@ export default {
       if (
         this.chsFhList.indexOf(item.chs) > -1 ||
         item.chs == "“" ||
-        item.chs == "("
+        item.chs == "(" ||
+        /^[a-zA-Z0-9]/.test(item.chs)
       ) {
         return false;
       }

+ 4 - 1
src/components/Adult/preview/Voicefullscreen-ly.vue

@@ -2472,7 +2472,10 @@ export default {
       if (_this.TaskModel == "ANSWER") {
         return;
       }
-      if (_this.chsFhList.indexOf(item.chs) > -1) {
+      if (
+        _this.chsFhList.indexOf(item.chs) > -1 ||
+        /^[a-zA-Z0-9]/.test(item.chs)
+      ) {
         return;
       }
       if (_this.oldHz != item.chs) {

+ 4 - 1
src/components/Adult/preview/Voicefullscreen.vue

@@ -1160,7 +1160,10 @@ export default {
       if (_this.TaskModel == "ANSWER") {
         return;
       }
-      if (_this.chsFhList.indexOf(item.chs) > -1) {
+      if (
+        _this.chsFhList.indexOf(item.chs) > -1 ||
+        /^[a-zA-Z0-9]/.test(item.chs)
+      ) {
         return;
       }
       if (_this.oldHz != item.chs) {