Selaa lähdekoodia

语音全屏-bug修改

guanchunjie 3 vuotta sitten
vanhempi
commit
dfe869ba54
1 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. 5 2
      src/components/Adult/preview/AudioLineSentence.vue

+ 5 - 2
src/components/Adult/preview/AudioLineSentence.vue

@@ -102,6 +102,7 @@ export default {
       duioCurrentTime: null, // 剩余时间
       count: 0,
       loading: null,
+      playcount: 0,
     };
   },
   // 计算属性 类似于data概念
@@ -216,12 +217,13 @@ export default {
       } else {
         if (this.count == 0) {
           this.audio.loading = true;
+          this.count++;
         }
 
         this.$refs[audioId].play();
-        if (this.count == 0) {
+        if (this.playcount == 0) {
           this.onTimeupdateTime(this.bg / 1000);
-          this.count++;
+          this.playcount++;
         }
 
         this.$emit("handleChangeStopAudio");
@@ -274,6 +276,7 @@ export default {
         if (_this.audio.currentTime * 1000 > _this.ed) {
           if (_this.$refs[audioId]) {
             _this.$refs[audioId].pause();
+            _this.playcount = 0;
           }
         }
       }, 50);