fix: prettier format

This commit is contained in:
2026-07-30 09:58:33 +08:00
parent f3d39a1e08
commit ffe2ccb7fb
@@ -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<HTMLDivElement>;
trackRef: React.RefObject<HTMLDivElement>
/** 添加卡片ref */
addCardRef: React.RefObject<HTMLDivElement>;
addCardRef: React.RefObject<HTMLDivElement>
/** 播放头拖拽开始 */
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<ClipTrackProps> = ({
</div>
</div>
</div>
);
};
)
}