类型
🌐 Types
Align
Align 类型包含 NodeToolbar 组件 align 属性所需的值。
Read moreAriaLabelConfig
使用 AriaLabelConfig,你可以自定义 React Flow 使用的 aria 标签和描述。
Read moreBackgroundVariant
这三种变体作为一个枚举导出以方便使用。你可以导入这个枚举并像使用 BackgroundVariant.Lines 那样使用它,也可以直接使用原始字符串值。
Read moreColorMode
ColorMode 类型定义了 ReactFlow 组件可用的颜色模式。
Read moreConnection
连接类型是两个节点之间边的基本最小描述。addEdge 工具可以用来将连接升级为边。
Read moreConnectionLineComponent
自定义 React 组件,用于在创建边时渲染连接线。
Read moreConnectionLineComponentProps
如果你想为连接线渲染自定义组件,可以在 ReactFlow 组件上设置 connectionLineComponent 属性。ConnectionLineComponentProps 会传递给你的自定义组件。
Read moreConnectionLineType
如果你在 ReactFlow 组件上设置 connectionLineType 属性,它将决定在创建新边时渲染的连接线样式。
Read moreConnectionMode
指定节点之间建立连接的规则。
Read moreConnectionState
有关正在进行的连接的数据。
Read moreCoordinateExtent
坐标范围表示坐标系统中的两个点:一个在左上角,一个在右下角。它用于表示流程中节点的边界或视口的边界。
Read moreDefaultEdgeOptions
Edge 上的许多属性是可选的。当创建一个新的 edge 时,未提供的属性将使用传递给 ReactFlow 组件的 defaultEdgeOptions 属性的默认值进行填充。
Read moreDeleteElements
DeleteElements 从流中删除节点和边缘,并异步返回已删除的边缘和节点。
Read moreEdge
当连接是两个节点之间边的最小描述时,`Edge` 是完整的描述,包含 React Flow 渲染它所需知道的所有信息。
Read moreEdgeChange
onEdgesChange 回调接收一个 EdgeChange 对象数组,你应该 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.
Read moreEdgeMarker
边可以在边的起点和终点选择性地有标记。EdgeMarker 类型 is used to configure those markers! Check the docs for MarkerType for details on what types of edge marker are available.
Read moreEdgeMouseHandler
EdgeMouseHandler 类型定义了鼠标事件发生在边上时调用的回调函数。
Read moreEdgeProps
当你实现自定义边时,它会被封装在一个启用某些基本功能的组件中。你的自定义边组件接收以下属性:
Read moreEdgeTypes
EdgeTypes 类型用于定义自定义边类型。
Read moreFitViewOptions
在调用 fitView 时,可以使用这些选项来自定义行为。例如,duration 选项可以用来在给定时间内平滑地转换视口。
Read moreHandle
处理 id、位置和类型等属性。
Read moreHandleConnection
HandleConnection 类型是包含 edgeId 的连接。
Read moreInternalNode
InternalNode 是基础 Node 类型的扩展,带有 React Flow 内部用于渲染的附加属性。
Read moreIsValidConnection
用于确定节点之间连接是否有效的函数类型。
Read moreKeyCode
表示键盘按键代码或组合键。
Read moreMarkerType
边缘的任一端可选择性地有一个标记。MarkerType 类型列举了 the options available to you when configuring a given marker.
Read moreMiniMapNodeProps
MiniMapNodeProps 类型定义了小地图组件中节点的属性。
Read moreNode
节点类型表示 React Flow 需要了解的关于给定节点的所有信息。许多这些属性可以由 React Flow 或你进行操作,但有些属性,如宽度和高度,应视为只读。
Read moreNodeChange
onNodesChange 回调接受一个 NodeChange 对象数组,你应该 use to update your flow's state. The NodeChange type is a union of six different object types that represent that various ways an node can change in a flow.
Read moreNodeConnection
NodeConnection 类型是包含 edgeId 的连接。
Read moreNodeHandle
NodeHandle 类型用于在使用服务器端渲染时定义节点的句柄。
Read moreNodeMouseHandler
NodeMouseHandler 类型定义了在鼠标事件发生时调用的回调函数 occur on a node.
Read moreNodeOrigin
Node 的原点决定了它相对于自身坐标的放置方式。
Read moreNodeProps
当你实现一个自定义节点时,它会被封装在一个组件中,该组件提供基本功能,如选择和拖拽。你的自定义节点会接收以下属性:
Read moreNodeTypes
NodeTypes 类型用于定义自定义节点类型。
Read moreOnBeforeDelete
OnBeforeDelete 类型定义了在删除节点或边之前调用的回调函数。
Read moreOnConnect
节点之间创建新连接时触发回调函数。
Read moreOnConnectEnd
完成或取消节点之间的连接尝试时触发回调函数。
Read moreOnConnectStart
开始创建节点间连接时触发回调函数。
Read moreOnDelete
OnDelete 类型定义了删除节点或边时调用的回调函数。
Read moreOnEdgesChange
Read moreOnEdgesDelete
OnEdgesDelete 类型定义了删除边时调用的回调函数。
Read moreOnError
OnError 类型定义了发生错误时调用的回调函数。
Read moreOnInit
OnInit 类型定义了在初始化 ReactFlow 实例时调用的回调函数。
Read moreOnMove
在视口移动(例如平移或缩放)时调用。
Read moreOnNodeDrag
OnNodeDrag 类型定义了在拖动节点时调用的回调函数。
Read moreOnNodesChange
Read moreOnNodesDelete
OnNodesDelete 类型定义了在删除节点时调用的回调函数。
Read moreOnReconnect
现有边重新连接到其他节点或句柄时触发回调函数。
Read moreOnSelectionChangeFunc
流程图中节点或边的选择发生变化时调用。
Read morePanOnScrollMode
配置视口如何响应滚动事件,允许自由、垂直或 horizontal panning.
Read morePanelPosition
这种类型主要用于帮助在流视口上定位元素。例如,MiniMap 和 Controls 组件都使用这种类型的 position 属性。
Read morePosition
虽然 PanelPosition 可以用来将组件放置在容器的角落,但 Position 枚举的精确度较低,主要用于与边缘和控制柄相关的位置。
Read moreProOptions
默认情况下,我们会在你的流程角落显示一个小的署名,并链接回该项目。
Read moreReactFlowInstance
ReactFlowInstance 提供了一组方法来查询和操作流的内部状态。你可以通过使用 useReactFlow 钩子或者将监听器附加到 onInit 事件来获取一个实例。
Read moreReactFlowJsonObject
你流程的 JSON 兼容表示。你可以使用它将流程保存到数据库中,例如,然后稍后再加载回来。
Read moreRect
Rect 类型定义了一个具有尺寸和位置的矩形。
Read moreResizeParams
ResizeParams 类型用于为由...发出的各种事件定义类型 NodeResizer component. You'll sometimes see this type extended with an additional direction field too.
Read moreSelectionDragHandler
在交互操作期间处理选定节点的拖动事件。
Read moreSelectionMode
控制流程图中节点的选择方式,提供完全或部分选择行为。
Read moreSnapGrid
SnapGrid 类型定义了在窗格上捕捉节点的网格大小。
Read moreViewport
在内部,React Flow 维护了一个独立于页面其他部分的坐标系统。Viewport 类型告诉你在该系统中你的流程当前显示的位置以及缩放程度。
Read moreXYPosition
所有位置都存储在具有 x 和 y 坐标的对象中。
Read moreZIndexMode
ZIndexMode 类型用于定义如何计算节点和边的 z-index。
Read more