Skip to Content
参考类型

EdgeChange

GitHub上的源代码 

onEdgesChange 回调接收一个 EdgeChange 对象数组,你应该使用它来更新你的流程状态。EdgeChange 类型是四种不同对象类型的联合体,表示流程中边缘变化的各种方式。

🌐 The onEdgesChange callback takes an array of EdgeChange objects that you should use to update your flow’s state. The EdgeChange type is a union of four different object types that represent that various ways an edge can change in a flow.

export type EdgeChange = | EdgeAddChange | EdgeRemoveChange | EdgeReplaceChange | EdgeSelectionChange;

变体

🌐 Variants

EdgeAddChange

NameTypeDefault
itemEdgeType
type"add"
indexnumber

EdgeRemoveChange

NameTypeDefault
idstring
type"remove"

EdgeReplaceChange

NameTypeDefault
idstring
itemEdgeType
type"replace"

EdgeSelectionChange

NameTypeDefault
idstring
type"select"
selectedboolean
Last updated on