bill 4 tháng trước cách đây
mục cha
commit
5ebd9d04e4
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      src/sdk/association/animation.ts

+ 4 - 0
src/sdk/association/animation.ts

@@ -425,6 +425,10 @@ export const endTime = computed(() => {
 export const play = ref(false);
 watch(play, (_a, _b, onCleanup) => {
   play.value ? animationGroup?.play() : animationGroup?.pause();
+  if (!play.value) return;
+  if (currentTime.value >= endTime.value) {
+    currentTime.value = 0
+  }
   onCleanup(
     watchEffect(() => {
       if (currentTime.value >= endTime.value) {