From ffe2ccb7fbaa35517dc132dfb4a38eca6fa089ca Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Thu, 30 Jul 2026 09:58:33 +0800 Subject: [PATCH] fix: prettier format --- .../components/timeline/ClipTrack.tsx | 64 +++++++++---------- 1 file changed, 30 insertions(+), 34 deletions(-) diff --git a/apps/web/src/pages/editing-planner/components/timeline/ClipTrack.tsx b/apps/web/src/pages/editing-planner/components/timeline/ClipTrack.tsx index 12722a65b..37ed89dd5 100644 --- a/apps/web/src/pages/editing-planner/components/timeline/ClipTrack.tsx +++ b/apps/web/src/pages/editing-planner/components/timeline/ClipTrack.tsx @@ -1,62 +1,58 @@ -import React from "react"; -import type { ClipData } from "../../types"; -import { ClipCard } from "./ClipCard"; +import React from "react" +import type { ClipData } from "../../types" +import { ClipCard } from "./ClipCard" interface ClipTrackProps { /** 片段列表 */ - clips: ClipData[]; + clips: ClipData[] /** 选中的片段ID */ - selectedClipId: string | null; + selectedClipId: string | null /** 缩放:每秒像素数 */ - pps: number; + pps: number /** 当前播放时间(秒) */ - currentTime: number; + currentTime: number /** 总时长(秒) */ - totalDuration: number; + totalDuration: number /** 正在拖拽的片段索引 */ - dragIdx: number | null; + dragIdx: number | null /** 拖拽悬停的片段索引 */ - dragOverIdx: number | null; + dragOverIdx: number | null /** 悬停的片段ID */ - hoveredClipId: string | null; + hoveredClipId: string | null /** 是否正在裁剪拖拽 */ - trimDragActive: boolean; + trimDragActive: boolean /** 是否显示裁剪手柄 */ - showTrimHandles: boolean; + showTrimHandles: boolean /** 轨道ref */ - trackRef: React.RefObject; + trackRef: React.RefObject /** 添加卡片ref */ - addCardRef: React.RefObject; + addCardRef: React.RefObject /** 播放头拖拽开始 */ - onPlayheadMouseDown: (e: React.MouseEvent) => void; + onPlayheadMouseDown: (e: React.MouseEvent) => void /** 片段选中 */ - onClipSelect: (clipId: string) => void; + onClipSelect: (clipId: string) => void /** 拖拽开始 */ - onDragStart: (e: React.DragEvent, idx: number) => void; + onDragStart: (e: React.DragEvent, idx: number) => void /** 拖拽悬停 */ - onDragOver: (e: React.DragEvent, idx: number) => void; + onDragOver: (e: React.DragEvent, idx: number) => void /** 拖拽结束 */ - onDragEnd: () => void; + onDragEnd: () => void /** 放置 */ - onDrop: (e: React.DragEvent, idx: number) => void; + onDrop: (e: React.DragEvent, idx: number) => void /** 空区域拖拽悬停 */ - onEmptyDragOver: (e: React.DragEvent) => void; + onEmptyDragOver: (e: React.DragEvent) => void /** 右键菜单 */ - onContextMenu: (e: React.MouseEvent, clipId: string) => void; + onContextMenu: (e: React.MouseEvent, clipId: string) => void /** 片段悬停进入 */ - onClipMouseEnter: (clipId: string) => void; + onClipMouseEnter: (clipId: string) => void /** 片段悬停离开 */ - onClipMouseLeave: () => void; + onClipMouseLeave: () => void /** 裁剪手柄按下 */ - onTrimHandleMouseDown: ( - e: React.MouseEvent, - clipId: string, - direction: "left" | "right", - ) => void; + onTrimHandleMouseDown: (e: React.MouseEvent, clipId: string, direction: "left" | "right") => void /** 删除片段 */ - onClipRemove: (clipId: string) => void; + onClipRemove: (clipId: string) => void /** 点击添加卡片 */ - onTogglePicker: () => void; + onTogglePicker: () => void } /** @@ -146,5 +142,5 @@ export const ClipTrack: React.FC = ({ - ); -}; \ No newline at end of file + ) +}