|
@@ -54,7 +54,7 @@ import { Slider, TabPane, Tabs } from "ant-design-vue";
|
|
import { AnimationModel, AnimationModelAction } from "@/api";
|
|
import { AnimationModel, AnimationModelAction } from "@/api";
|
|
import SignItem from "@/views/tagging-position/sign-item.vue";
|
|
import SignItem from "@/views/tagging-position/sign-item.vue";
|
|
import { amMap } from "@/sdk/association/animation";
|
|
import { amMap } from "@/sdk/association/animation";
|
|
-import { computed, ref } from "vue";
|
|
|
|
|
|
+import { computed, ref, watch, watchEffect } from "vue";
|
|
import { round } from "@/utils";
|
|
import { round } from "@/utils";
|
|
|
|
|
|
const props = defineProps<{ data: AnimationModelAction; am: AnimationModel }>();
|
|
const props = defineProps<{ data: AnimationModelAction; am: AnimationModel }>();
|
|
@@ -67,6 +67,22 @@ const dur = computed(() => {
|
|
return action?.duration / props.data.speed;
|
|
return action?.duration / props.data.speed;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+watch(
|
|
|
|
+ () => amMap[props.am.id]?.actions[props.data.id],
|
|
|
|
+ (action, _, onCleanup) => {
|
|
|
|
+ console.log(action);
|
|
|
|
+ if (action) {
|
|
|
|
+ console.log("chose", true);
|
|
|
|
+ action.chose && action.chose(true);
|
|
|
|
+ onCleanup(() => {
|
|
|
|
+ action.chose && action.chose(false);
|
|
|
|
+ console.log("chose", false);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ { immediate: true }
|
|
|
|
+);
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|