Skip to Content
参考类型

类型

🌐 Types

Align

Align 类型包含 NodeToolbar 组件 align 属性所需的值。

Read more

BackgroundVariant

这三种变体作为一个枚举导出以方便使用。你可以导入这个枚举并像使用 BackgroundVariant.Lines 那样使用它,也可以直接使用原始字符串值。

Read more

Connection

连接类型是两个节点之间边的基本最小描述。addEdge 工具可以用来将连接升级为边。

Read more

ConnectionLineComponentProps

如果你想为连接线渲染自定义组件,可以在 ReactFlow 组件上设置 connectionLineComponent 属性。ConnectionLineComponentProps 会传递给你的自定义组件。

Read more

ConnectionLineType

如果你在 ReactFlow 组件上设置 connectionLineType 属性,它将决定在创建新边时渲染的连接线样式。

Read more

CoordinateExtent

坐标范围表示坐标系统中的两个点:一个在左上角,一个在右下角。它用于表示流程中节点的边界或视口的边界。

Read more

DefaultEdgeOptions

Edge 上的许多属性是可选的。当创建一个新的 edge 时,未提供的属性将使用传递给 ReactFlow 组件的 defaultEdgeOptions 属性的默认值进行填充。

Read more

Edge

当连接是两个节点之间边的最小描述时,`Edge` 是完整的描述,包含 React Flow 渲染它所需知道的所有信息。

Read more

EdgeChange

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 more

EdgeMarker

边可以在边的起点和终点选择性地有标记。EdgeMarker 类型 is used to configure those markers! Check the docs for MarkerType for details on what types of edge marker are available.

Read more

EdgeProps

当你实现自定义边时,它会被封装在一个启用某些基本功能的组件中。你的自定义边组件接收以下属性:

Read more

FitViewOptions

在调用 fitView 时,可以使用这些选项来自定义行为。例如,duration 选项可以用来在给定时间内平滑地转换视口。

Read more

InternalNode

InternalNode 是基础 Node 类型的扩展,带有 React Flow 内部用于渲染的附加属性。

Read more

MarkerType

边缘的任一端可选择性地有一个标记。MarkerType 类型列举了 the options available to you when configuring a given marker.

Read more

Node

节点类型表示 React Flow 需要了解的关于给定节点的所有信息。许多这些属性可以由 React Flow 或你进行操作,但有些属性,如宽度和高度,应视为只读。

Read more

NodeChange

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 more

NodeProps

当你实现一个自定义节点时,它会被封装在一个组件中,该组件提供基本功能,如选择和拖拽。你的自定义节点会接收以下属性:

Read more

OnInit

OnInit 类型定义了在初始化 ReactFlow 实例时调用的回调函数。

Read more

PanelPosition

这种类型主要用于帮助在流视口上定位元素。例如,MiniMap 和 Controls 组件都使用这种类型的 position 属性。

Read more

Position

虽然 PanelPosition 可以用来将组件放置在容器的角落,但 Position 枚举的精确度较低,主要用于与边缘和控制柄相关的位置。

Read more

ProOptions

默认情况下,我们会在你的流程角落显示一个小的署名,并链接回该项目。

Read more

ReactFlowInstance

ReactFlowInstance 提供了一组方法来查询和操作流的内部状态。你可以通过使用 useReactFlow 钩子或者将监听器附加到 onInit 事件来获取一个实例。

Read more

ReactFlowJsonObject

你流程的 JSON 兼容表示。你可以使用它将流程保存到数据库中,例如,然后稍后再加载回来。

Read more

Rect

Rect 类型定义了一个具有尺寸和位置的矩形。

Read more

ResizeParams

ResizeParams 类型用于为由...发出的各种事件定义类型 NodeResizer component. You'll sometimes see this type extended with an additional direction field too.

Read more

Viewport

在内部,React Flow 维护了一个独立于页面其他部分的坐标系统。Viewport 类型告诉你在该系统中你的流程当前显示的位置以及缩放程度。

Read more
Last updated on