Sfoglia il codice sorgente

Merge branch 'v1.2.0-ga' of http://192.168.0.115:3000/bill/fuse-code into v1.2.0-ga

xzw 4 mesi fa
parent
commit
23861de25a

+ 0 - 1
src/views/animation/bottom.vue

@@ -7,7 +7,6 @@
         @click="
           () => {
             play = !play;
-            $emit('update:follow', play);
           }
         "
       />

+ 4 - 1
src/views/animation/index.vue

@@ -31,7 +31,7 @@
     <BottomPano>
       <Bottom
         :am="focusAM"
-        v-model:follow="follow"
+        :follow="play || follow"
         v-model:current-time="currentTime"
         v-model:active="activeAttrib"
       />
@@ -96,6 +96,9 @@ const activeAttrib = ref<Active>();
 
 const follow = ref(false);
 const frameAction = ref<string>();
+watchEffect(() => {
+  console.error("floow", follow.value || play.value);
+});
 
 const amM = computed(() => focusAM.value && amMap[getAMKey(focusAM.value)]);
 

+ 9 - 2
src/views/animation/left.vue

@@ -50,6 +50,7 @@ import { TabPane, Tabs } from "ant-design-vue";
 import { ams, AnimationModel, createAnimationModel } from "@/store/animation";
 import { useSelects } from "@/hook/ids";
 import { fetchMaterialGroups } from "@/api/material";
+import { amMap } from "@/sdk/association/animation";
 
 useViewStack(() =>
   togetherCallback([
@@ -80,8 +81,14 @@ const updateSelectAm = (item: AnimationModel, select: boolean) => {
 
 // if (import.meta.env.DEV) {
 activeKey.value = "animation";
-setTimeout(() => {
-  emit("update:focus", ams.value[0]);
+const stop = watchEffect(() => {
+  if (amMap[ams.value[0]?.id].am) {
+    setTimeout(() => {
+      console.error(ams.value[0]);
+      emit("update:focus", ams.value[0]);
+      stop();
+    }, 1000);
+  }
 });
 // }