ソースを参照

Merge branch 'preOnline'

mo 1 年間 前
コミット
4c0f097cf3
1 ファイル変更11 行追加6 行削除
  1. 11 6
      src/components/timerMeter/components/countdown.tsx

+ 11 - 6
src/components/timerMeter/components/countdown.tsx

@@ -157,13 +157,18 @@ export default defineComponent({
       }, 600);
     };
     const onReset = () => {
-      suspendNum();
-      count.value = 0;
-      soundVIdeo.currentTime = 0;
-      soundVIdeo.pause();
-      setTimeout(() => {
+      if( isPlaying.value ){
+        suspendNum();
+        count.value = 0;
+        soundVIdeo.currentTime = 0;
+        soundVIdeo.pause();
+        setTimeout(()=>{
+          init();
+        },600)
+      }else {
         init();
-      }, 600);
+      }
+
     };
     onMounted(() => {
       nextTick(() => {