Skip to content

store.AppState

canisminor1990 edited this page Apr 8, 2023 · 1 revision

Interface: AppState

store.AppState

Table of contents

Properties

Properties

counter

counter: number

Title

计数器

Defined in

src/store/AppState.ts:33


customWidgets

customWidgets: string[]

Title

自定义小部件

Defined in

src/store/AppState.ts:43


edgeType

edgeType: EdgeTypes

Title

边类型 ['step', 'smoothstep', 'straight', 'flowchart', 'bezier']

Enum Names

['步进', '平滑步进', '直线', '流程图', '贝塞尔']

Defined in

src/store/AppState.ts:82


edges

edges: Edge[]

Title

Defined in

src/store/AppState.ts:58


gallery

gallery: GalleryItem[]

Title

画廊

Defined in

src/store/AppState.ts:68


graph

graph: Record<string, SDNode>

Title

图表

Defined in

src/store/AppState.ts:48


nodeInProgress

Optional nodeInProgress: NodeInProgress

Title

节点正在进行

Defined in

src/store/AppState.ts:87


nodes

nodes: Node[]

Title

节点

Defined in

src/store/AppState.ts:53


onAddNode

onAddNode: (nodeItem: NodeItem) => void

Type declaration

▸ (nodeItem): void

Title

添加节点

Parameters
Name Type Description
nodeItem NodeItem 节点项
Returns

void

Defined in

src/store/AppState.ts:180


onConnect

onConnect: OnConnect

Title

连接

Defined in

src/store/AppState.ts:267


onCopyNode

onCopyNode: () => PersistedGraph

Type declaration

▸ (): PersistedGraph

Title

复制节点

Returns

PersistedGraph

持久化图表

Defined in

src/store/AppState.ts:229


onCreateGroup

onCreateGroup: () => void

Type declaration

▸ (): void

Title

创建组

Returns

void

Defined in

src/store/AppState.ts:140


onDeleteFromQueue

onDeleteFromQueue: (id: number) => Promise<void>

Type declaration

▸ (id): Promise<void>

Title

从队列中删除

Parameters
Name Type Description
id number 节点 ID
Returns

Promise<void>

Defined in

src/store/AppState.ts:293


onDeleteNode

onDeleteNode: (id: string) => void

Type declaration

▸ (id): void

Title

删除节点

Parameters
Name Type Description
id string 节点 ID
Returns

void

Defined in

src/store/AppState.ts:186


onDetachGroup

onDetachGroup: (node: Node) => Node

Type declaration

▸ (node): Node

Title

分离组

Parameters
Name Type Description
node Node 节点
Returns

Node

节点

Defined in

src/store/AppState.ts:161


onDetachNodesGroup

onDetachNodesGroup: (childIds: string[], groupNode: Node) => void

Type declaration

▸ (childIds, groupNode): void

Title

分离节点组

Parameters
Name Type Description
childIds string[] 子节点 ID 数组
groupNode Node 组节点
Returns

void

Defined in

src/store/AppState.ts:154


onDownloadWorkflow

onDownloadWorkflow: () => void

Type declaration

▸ (): void

Title

下载工作流

Returns

void

Defined in

src/store/AppState.ts:343


onDuplicateNode

onDuplicateNode: (id: string) => void

Type declaration

▸ (id): void

Title

复制节点

Parameters
Name Type Description
id string 节点 ID
Returns

void

Defined in

src/store/AppState.ts:192


onEdgesAnimate

onEdgesAnimate: (animated: boolean) => void

Type declaration

▸ (animated): void

Title

边动画

Parameters
Name Type Description
animated boolean 是否动画
Returns

void

Defined in

src/store/AppState.ts:252


onEdgesChange

onEdgesChange: OnEdgesChange

Title

边变化

Param

边数组

Defined in

src/store/AppState.ts:246


onEdgesType

onEdgesType: (type: EdgeTypes) => void

Type declaration

▸ (type): void

Title

边类型

Parameters
Name Type Description
type EdgeTypes 边类型
Returns

void

Defined in

src/store/AppState.ts:258


onGetNodeFieldsData

onGetNodeFieldsData: (id: string, key: string) => any

Type declaration

▸ (id, key): any

Title

获取节点字段数据

Parameters
Name Type Description
id string 节点 ID
key string 字段名
Returns

any

字段数据

Defined in

src/store/AppState.ts:223


onImageSave

onImageSave: (id: string, images: ImageItem[]) => void

Type declaration

▸ (id, images): void

Title

保存图片

Parameters
Name Type Description
id string 节点 ID
images ImageItem[] 图片数组
Returns

void

Defined in

src/store/AppState.ts:278


onInit

onInit: () => Promise<void>

Type declaration

▸ (): Promise<void>

Title

初始化

Returns

Promise<void>

Defined in

src/store/AppState.ts:125


onLoadLocalWorkflow

onLoadLocalWorkflow: (id: string) => void

Type declaration

▸ (id): void

Title

加载本地工作流

Parameters
Name Type Description
id string 工作流 ID
Returns

void

Defined in

src/store/AppState.ts:319


onLoadWorkflow

onLoadWorkflow: (persisted: PersistedGraph) => void

Type declaration

▸ (persisted): void

Title

加载工作流

Parameters
Name Type Description
persisted PersistedGraph 持久化数据
Returns

void

Defined in

src/store/AppState.ts:338


onModifyChange

onModifyChange: OnPropChange

Title

修改变化

Param

节点 ID

Param

属性

Param

Defined in

src/store/AppState.ts:215


onNewClientId

onNewClientId: (id: string) => void

Type declaration

▸ (id): void

Title

获取新的客户端 ID

Parameters
Name Type Description
id string 客户端 ID
Returns

void

Defined in

src/store/AppState.ts:131


onNodeInProgress

onNodeInProgress: (id: string, progress: number) => void

Type declaration

▸ (id, progress): void

Title

节点进行中

Parameters
Name Type Description
id string 节点 ID
progress number 进度
Returns

void

Defined in

src/store/AppState.ts:199


onNodesChange

onNodesChange: OnNodesChange

Title

节点变化

Param

节点数组

Defined in

src/store/AppState.ts:167


onPasteNode

onPasteNode: (workflow: PersistedGraph, postion: { x: number ; y: number }) => void

Type declaration

▸ (workflow, postion): void

Title

粘贴节点

Parameters
Name Type Description
workflow PersistedGraph 工作流
postion Object 位置
postion.x number -
postion.y number -
Returns

void

Defined in

src/store/AppState.ts:236


onPersistTemp

onPersistTemp: () => void

Type declaration

▸ (): void

Title

持久化临时

Returns

void

Defined in

src/store/AppState.ts:307


onPropChange

onPropChange: OnPropChange

Title

属性变化

Param

节点 ID

Param

属性

Param

Defined in

src/store/AppState.ts:207


onQueueUpdate

onQueueUpdate: () => Promise<void>

Type declaration

▸ (): Promise<void>

Title

更新队列

Returns

Promise<void>

Defined in

src/store/AppState.ts:298


onRefresh

onRefresh: () => Promise<void>

Type declaration

▸ (): Promise<void>

Title

刷新

Returns

Promise<void>

Defined in

src/store/AppState.ts:120


onSaveLocalWorkFlow

onSaveLocalWorkFlow: (title?: string) => void

Type declaration

▸ (title?): void

Title

保存本地工作流

Parameters
Name Type Description
title? string 标题
Returns

void

Defined in

src/store/AppState.ts:313


onSetNodesGroup

onSetNodesGroup: (childIds: string[], groupNode: Node) => void

Type declaration

▸ (childIds, groupNode): void

Title

设置节点组

Parameters
Name Type Description
childIds string[] 子节点 ID 数组
groupNode Node 组节点
Returns

void

Defined in

src/store/AppState.ts:147


onSetPage

onSetPage: (value: string) => void

Type declaration

▸ (value): void

Title

设置页面

Parameters
Name Type Description
value string 页面值
Returns

void

Defined in

src/store/AppState.ts:109


onSetThemeMode

onSetThemeMode: (type: ThemeMode) => void

Type declaration

▸ (type): void

Title

设置主题模式

Parameters
Name Type Description
type ThemeMode 主题模式类型
Returns

void

Defined in

src/store/AppState.ts:115


onSubmit

onSubmit: () => Promise<void>

Type declaration

▸ (): Promise<void>

Title

提交

Returns

Promise<void>

Defined in

src/store/AppState.ts:287


onUpdateLocalWorkFlowGraph

onUpdateLocalWorkFlowGraph: (id: string) => void

Type declaration

▸ (id): void

Title

更新本地工作流图表

Parameters
Name Type Description
id string 工作流 ID
Returns

void

Defined in

src/store/AppState.ts:325


onUpdateLocalWorkFlowTitle

onUpdateLocalWorkFlowTitle: (id: string, title: string) => void

Type declaration

▸ (id, title): void

Title

更新本地工作流标题

Parameters
Name Type Description
id string 工作流 ID
title string 标题
Returns

void

Defined in

src/store/AppState.ts:332


onUpdateNodes

onUpdateNodes: (id: string, data: any) => void

Type declaration

▸ (id, data): void

Title

更新节点

Parameters
Name Type Description
id string 节点 ID
data any 节点数据
Returns

void

Defined in

src/store/AppState.ts:174


page

page: string

Title

页面

Defined in

src/store/AppState.ts:28


queue

queue: QueueItem[]

Title

队列

Defined in

src/store/AppState.ts:63


themeMode

themeMode: ThemeMode

Title

主题模式 ['light', 'dark']

Enum Names

['亮色', '暗色']

Defined in

src/store/AppState.ts:75


widgets

widgets: Record<string, Widget>

Title

小部件

Defined in

src/store/AppState.ts:38

Clone this wiki locally