Skip to content

@vue-flow/monorepoDocs


Function: useEdge()

useEdge<Data, CustomEvents>(id?): object

Composable that provides access to an edge object and it's dom element

If no edge id is provided, the edge id is injected from context

If you do not provide an id, this composable has to be called in a child of your custom edge component, or it will throw

Type Parameters

Data = any

CustomEvents extends Record<string, CustomEvent> = any

Parameters

id?: string

The id of the edge to access

Returns

object

the edge id, the edge and the edge dom element

edge

edge: GraphEdge<Data, CustomEvents>

edgeEl

edgeEl: Ref<null | SVGElement>

id

id: string = edgeId

VueFlow v1.42 中文网 - 粤ICP备13048890号