feat(ui): new WorkflowElements using antd

This commit is contained in:
Fu Diwei
2025-01-03 20:29:34 +08:00
parent c6a8f923e4
commit 8a16893082
43 changed files with 805 additions and 810 deletions

View File

@@ -25,8 +25,9 @@ export type WorkflowState = {
getWorkflowOuptutBeforeId: (id: string, type: string) => WorkflowNode[];
switchEnable(): void;
save(): void;
init(id: string): void;
setBaseInfo: (name: string, description: string) => void;
init(id: string): void;
destroy(): void;
};
export const useWorkflowStore = create<WorkflowState>((set, get) => ({
@@ -214,4 +215,11 @@ export const useWorkflowStore = create<WorkflowState>((set, get) => ({
getWorkflowOuptutBeforeId: (id: string, type: string) => {
return getWorkflowOutputBeforeId(get().workflow.draft as WorkflowNode, id, type);
},
destroy: () => {
set({
workflow: {} as WorkflowModel,
initialized: false,
});
},
}));