guanchunjie 3 år sedan
förälder
incheckning
83c29638f9
2 ändrade filer med 9 tillägg och 5 borttagningar
  1. 2 0
      src/components/Adult/Preview.vue
  2. 7 5
      src/components/Adult/preview/WordPhrase.vue

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

@@ -159,6 +159,8 @@
                     :cur-que="itemss.data"
                     :theme-color="themeColor"
                     :currentTreeID="currentTreeID"
+                    :indexs="indexs"
+                    :indexss="indexss"
                     v-if="refresh"
                   />
                 </template>

+ 7 - 5
src/components/Adult/preview/WordPhrase.vue

@@ -58,7 +58,7 @@
                     @click="palyAudio(sItem.sIndex)"
                   ></span>
                   <audio
-                    :id="'word' + sItem.sIndex"
+                    :id="'word' + indexs + indexss + sItem.sIndex"
                     :src="sItem.mp3_list[0].id"
                   ></audio>
                 </template>
@@ -123,7 +123,7 @@ export default {
   components: {
     WordPhraseDetail,
   },
-  props: ["curQue", "themeColor", "currentTreeID"],
+  props: ["curQue", "themeColor", "currentTreeID", "indexs", "indexss"],
   data() {
     //这里存放数据
     return {
@@ -160,7 +160,9 @@ export default {
     palyAudio(sIndex) {
       let _this = this;
       _this.stopAudio();
-      let node = document.getElementById("word" + sIndex);
+      let node = document.getElementById(
+        "word" + _this.indexs + _this.indexss + sIndex
+      );
       _this.playWord = node;
       if (node) {
         this.mp3_index = sIndex;
@@ -505,8 +507,8 @@ export default {
         &.active {
           width: 16px;
           height: 16px;
-          background: url("../../../assets/NPC/icon-voice-play-white.png") no-repeat
-            left top;
+          background: url("../../../assets/NPC/icon-voice-play-white.png")
+            no-repeat left top;
           background-size: 100% 100%;
         }
       }