-
Notifications
You must be signed in to change notification settings - Fork 18
store.AppState
store.AppState
- counter
- customWidgets
- edgeType
- edges
- gallery
- graph
- nodeInProgress
- nodes
- onAddNode
- onConnect
- onCopyNode
- onCreateGroup
- onDeleteFromQueue
- onDeleteNode
- onDetachGroup
- onDetachNodesGroup
- onDownloadWorkflow
- onDuplicateNode
- onEdgesAnimate
- onEdgesChange
- onEdgesType
- onGetNodeFieldsData
- onImageSave
- onInit
- onLoadLocalWorkflow
- onLoadWorkflow
- onModifyChange
- onNewClientId
- onNodeInProgress
- onNodesChange
- onPasteNode
- onPersistTemp
- onPropChange
- onQueueUpdate
- onRefresh
- onSaveLocalWorkFlow
- onSetNodesGroup
- onSetPage
- onSetThemeMode
- onSubmit
- onUpdateLocalWorkFlowGraph
- onUpdateLocalWorkFlowTitle
- onUpdateNodes
- page
- queue
- themeMode
- widgets
• counter: number
Title
计数器
• customWidgets: string
[]
Title
自定义小部件
• edgeType: EdgeTypes
Title
边类型 ['step', 'smoothstep', 'straight', 'flowchart', 'bezier']
Enum Names
['步进', '平滑步进', '直线', '流程图', '贝塞尔']
• edges: Edge
[]
Title
边
• gallery: GalleryItem
[]
Title
画廊
• graph: Record
<string
, SDNode
>
Title
图表
• Optional
nodeInProgress: NodeInProgress
Title
节点正在进行
• nodes: Node
[]
Title
节点
• onAddNode: (nodeItem
: NodeItem
) => void
▸ (nodeItem
): void
Title
添加节点
Name | Type | Description |
---|---|---|
nodeItem |
NodeItem |
节点项 |
void
• onConnect: OnConnect
Title
连接
• onCopyNode: () => PersistedGraph
▸ (): PersistedGraph
Title
复制节点
持久化图表
• onCreateGroup: () => void
▸ (): void
Title
创建组
void
• onDeleteFromQueue: (id
: number
) => Promise
<void
>
▸ (id
): Promise
<void
>
Title
从队列中删除
Name | Type | Description |
---|---|---|
id |
number |
节点 ID |
Promise
<void
>
• onDeleteNode: (id
: string
) => void
▸ (id
): void
Title
删除节点
Name | Type | Description |
---|---|---|
id |
string |
节点 ID |
void
• onDetachGroup: (node
: Node
) => Node
▸ (node
): Node
Title
分离组
Name | Type | Description |
---|---|---|
node |
Node |
节点 |
Node
节点
• onDetachNodesGroup: (childIds
: string
[], groupNode
: Node
) => void
▸ (childIds
, groupNode
): void
Title
分离节点组
Name | Type | Description |
---|---|---|
childIds |
string [] |
子节点 ID 数组 |
groupNode |
Node |
组节点 |
void
• onDownloadWorkflow: () => void
▸ (): void
Title
下载工作流
void
• onDuplicateNode: (id
: string
) => void
▸ (id
): void
Title
复制节点
Name | Type | Description |
---|---|---|
id |
string |
节点 ID |
void
• onEdgesAnimate: (animated
: boolean
) => void
▸ (animated
): void
Title
边动画
Name | Type | Description |
---|---|---|
animated |
boolean |
是否动画 |
void
• onEdgesChange: OnEdgesChange
Title
边变化
Param
边数组
• onEdgesType: (type
: EdgeTypes
) => void
▸ (type
): void
Title
边类型
Name | Type | Description |
---|---|---|
type |
EdgeTypes |
边类型 |
void
• onGetNodeFieldsData: (id
: string
, key
: string
) => any
▸ (id
, key
): any
Title
获取节点字段数据
Name | Type | Description |
---|---|---|
id |
string |
节点 ID |
key |
string |
字段名 |
any
字段数据
• onImageSave: (id
: string
, images
: ImageItem
[]) => void
▸ (id
, images
): void
Title
保存图片
Name | Type | Description |
---|---|---|
id |
string |
节点 ID |
images |
ImageItem [] |
图片数组 |
void
• onInit: () => Promise
<void
>
▸ (): Promise
<void
>
Title
初始化
Promise
<void
>
• onLoadLocalWorkflow: (id
: string
) => void
▸ (id
): void
Title
加载本地工作流
Name | Type | Description |
---|---|---|
id |
string |
工作流 ID |
void
• onLoadWorkflow: (persisted
: PersistedGraph
) => void
▸ (persisted
): void
Title
加载工作流
Name | Type | Description |
---|---|---|
persisted |
PersistedGraph |
持久化数据 |
void
• onModifyChange: OnPropChange
Title
修改变化
Param
节点 ID
Param
属性
Param
值
• onNewClientId: (id
: string
) => void
▸ (id
): void
Title
获取新的客户端 ID
Name | Type | Description |
---|---|---|
id |
string |
客户端 ID |
void
• onNodeInProgress: (id
: string
, progress
: number
) => void
▸ (id
, progress
): void
Title
节点进行中
Name | Type | Description |
---|---|---|
id |
string |
节点 ID |
progress |
number |
进度 |
void
• onNodesChange: OnNodesChange
Title
节点变化
Param
节点数组
• onPasteNode: (workflow
: PersistedGraph
, postion
: { x
: number
; y
: number
}) => void
▸ (workflow
, postion
): void
Title
粘贴节点
Name | Type | Description |
---|---|---|
workflow |
PersistedGraph |
工作流 |
postion |
Object |
位置 |
postion.x |
number |
- |
postion.y |
number |
- |
void
• onPersistTemp: () => void
▸ (): void
Title
持久化临时
void
• onPropChange: OnPropChange
Title
属性变化
Param
节点 ID
Param
属性
Param
值
• onQueueUpdate: () => Promise
<void
>
▸ (): Promise
<void
>
Title
更新队列
Promise
<void
>
• onRefresh: () => Promise
<void
>
▸ (): Promise
<void
>
Title
刷新
Promise
<void
>
• onSaveLocalWorkFlow: (title?
: string
) => void
▸ (title?
): void
Title
保存本地工作流
Name | Type | Description |
---|---|---|
title? |
string |
标题 |
void
• onSetNodesGroup: (childIds
: string
[], groupNode
: Node
) => void
▸ (childIds
, groupNode
): void
Title
设置节点组
Name | Type | Description |
---|---|---|
childIds |
string [] |
子节点 ID 数组 |
groupNode |
Node |
组节点 |
void
• onSetPage: (value
: string
) => void
▸ (value
): void
Title
设置页面
Name | Type | Description |
---|---|---|
value |
string |
页面值 |
void
• onSetThemeMode: (type
: ThemeMode
) => void
▸ (type
): void
Title
设置主题模式
Name | Type | Description |
---|---|---|
type |
ThemeMode |
主题模式类型 |
void
• onSubmit: () => Promise
<void
>
▸ (): Promise
<void
>
Title
提交
Promise
<void
>
• onUpdateLocalWorkFlowGraph: (id
: string
) => void
▸ (id
): void
Title
更新本地工作流图表
Name | Type | Description |
---|---|---|
id |
string |
工作流 ID |
void
• onUpdateLocalWorkFlowTitle: (id
: string
, title
: string
) => void
▸ (id
, title
): void
Title
更新本地工作流标题
Name | Type | Description |
---|---|---|
id |
string |
工作流 ID |
title |
string |
标题 |
void
• onUpdateNodes: (id
: string
, data
: any
) => void
▸ (id
, data
): void
Title
更新节点
Name | Type | Description |
---|---|---|
id |
string |
节点 ID |
data |
any |
节点数据 |
void
• page: string
Title
页面
• queue: QueueItem
[]
Title
队列
• themeMode: ThemeMode
Title
主题模式 ['light', 'dark']
Enum Names
['亮色', '暗色']
• widgets: Record
<string
, Widget
>
Title
小部件