shaogen1995 2 năm trước cách đây
mục cha
commit
529d4901eb
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      SWKK/src/components/Rbottom.vue

+ 4 - 2
SWKK/src/components/Rbottom.vue

@@ -281,7 +281,7 @@ export default {
         const dotAudioDomId = document.querySelector("#dotAudioDomId");
         if (dotAudioDomId) document.body.removeChild(dotAudioDomId);
 
-        if (!this.leftList[0].done) dom.play();
+        dom.play();
       } else dom.pause();
     },
   },
@@ -398,7 +398,9 @@ export default {
 
     // 给父组件调用的控制音乐播放的方法
     opMusic(val) {
-      this.music = val;
+      if (val) {
+        if (!this.leftList[0].done) this.music = true;
+      } else this.music = false;
     },
 
     // 给父组件操作控制左边按钮的方法