bill 4 mesi fa
parent
commit
9752353547

+ 2 - 2
src/components/drawing-time/time.vue

@@ -63,7 +63,7 @@ const timeRange = computed(() => {
   return { startTime, endTime };
 });
 
-const strokeWidth = 2;
+const strokeWidth = 1;
 const color = "#999";
 
 const shapeConfig = computed(() => {
@@ -95,7 +95,7 @@ const shapeConfig = computed(() => {
           .scale(invConfig.value.scaleX, 1)
           .decompose(),
         text: getText(i),
-        fontSize: strokeWidth * 6,
+        fontSize: strokeWidth * 12,
         fill: color,
         align: "left",
         verticalAlign: "top",

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

@@ -215,7 +215,12 @@ const add = <T extends Active["key"]>(
   key: T,
   preset: Partial<AnimationModel[T][0]> = {}
 ) => {
-  const attr = getAddTLItemAttr(focusAM.value![key], currentTime.value, 10, 1);
+  const attr = getAddTLItemAttr(
+    focusAM.value![key],
+    currentTime.value,
+    preset.duration || 10,
+    1
+  );
   if (!attr) {
     Message.error("当前时间已存在其他" + title[key]);
   } else {

+ 10 - 0
src/views/animation/right/am.vue

@@ -89,6 +89,7 @@
                   speed: 1,
                   key: action.action,
                   name: action.title,
+                  duration: getActionDur(action.action),
                 })
               "
             />
@@ -134,6 +135,7 @@ import { Switch, Slider, TabPane, Tabs } from "ant-design-vue";
 import { AnimationModel } from "@/api";
 import SignItem from "@/views/tagging-position/sign-item.vue";
 import { computed, ref } from "vue";
+import { round } from "@/utils";
 import { paths } from "@/store/path";
 import Message from "bill/components/message/message.vue";
 import { Modal } from "ant-design-vue";
@@ -195,6 +197,14 @@ const selectPathHandler = () => {
   emit("addPath", { name, pathId: pathId.value });
   visibleSelectPath.value = false;
 };
+
+const getActionDur = (key: string) => {
+  const actions = amMap[props.am.id].am?.getSupportActions() || [];
+  const action = actions.find((item) => item.name === key);
+  if (action?.duration) {
+    return round(action?.duration);
+  }
+};
 </script>
 
 <style scoped lang="scss">