feat(canvas): 画布节点 - 恢复批量创作表与转换能力

This commit is contained in:
ddCat
2026-09-15 20:56:19 +08:00
parent f59b59b3e6
commit c57f1b36ae
36 changed files with 3341 additions and 34 deletions

View File

@@ -26,6 +26,8 @@ export const NODE_DEFAULT_SIZE = {
[CanvasNodeType.Compare]: { width: 520, height: 320, title: "对比" },
[CanvasNodeType.Chart]: { width: 480, height: 320, title: "图表" },
[CanvasNodeType.ColorGrade]: { width: 420, height: 360, title: "调色" },
[CanvasNodeType.MediaConversion]: { width: 480, height: 460, title: "转换" },
[CanvasNodeType.BatchTable]: { width: 900, height: 520, title: "批量创作表" },
} satisfies Record<CanvasNodeType, { width: number; height: number; title: string }>;
export const NODE_SPECS = {
@@ -101,6 +103,23 @@ export const NODE_SPECS = {
...NODE_DEFAULT_SIZE[CanvasNodeType.ColorGrade],
metadata: { status: "idle" },
},
[CanvasNodeType.MediaConversion]: { ...NODE_DEFAULT_SIZE[CanvasNodeType.MediaConversion], metadata: { status: "idle" } },
[CanvasNodeType.BatchTable]: {
...NODE_DEFAULT_SIZE[CanvasNodeType.BatchTable],
metadata: {
status: "idle",
batchTable: {
operation: "try_on",
concurrency: 10,
referenceColumns: [
{ id: "reference-1", label: "参考图 1" },
{ id: "reference-2", label: "参考图 2" },
{ id: "reference-3", label: "参考图 3" },
],
rows: [],
},
},
},
} satisfies Record<CanvasNodeType, CanvasNodeSpec>;
export function getNodeSpec(type: CanvasNodeType) {