跳到主要内容

eo-diagram

<eo-diagram>

构件 eo-diagram

Examples

Basic

Playground

Page Architecture

Playground

Force

Playground

Properties

NameDescriptionTypeDefaultRequired
layout"dagre" | "force"
nodesDiagramNode[]
edgesDiagramEdge[]
nodeBricksNodeBrickConf[]
linesLineConf[]
layoutOptionsLayoutOptions
activeTargetActiveTarget | null
disableKeyboardActionboolean
connectNodesConnectNodesOptions
dragNodesDragNodesOptions
zoomableboolean true
scrollableboolean true
pannableboolean true
scaleRangeRangeTuple

Events

NameDescriptionEvent Detail
activeTarget.changeActiveTarget | null
node.deleteDiagramNode
edge.deleteDiagramEdge
line.clickLineTarget
line.dblclickLineTarget
nodes.connectConnectLineDetail

Methods

NameDescriptionParamsReturns
callOnLineLabelid: string, method: string, param_3: unknown[]

Type references

DiagramNode

NameTypeRequiredDescription
idDiagramNodeId
typestring
[key: string]unknown

DiagramEdge

NameTypeRequiredDescription
sourcestring
targetstring
typestring
[key: string]unknown

NodeBrickConf

NameTypeRequiredDescription
useBrickUseSingleBrickConf
nodeTypestring | string[]
ifstring | boolean | null

LineConf

extends LineConfOverridable
NameTypeRequiredDescription
edgeTypestring | string[]
ifstring | boolean | null
drawboolean
typeLineType
interactableboolean
curveTypeCurveType
arrowboolean
textTextOptions | TextOptions[]
labelLineLabelConf | LineLabelConf[]
cursorReact.CSSProperties["cursor"]
overridesLineConfOverrides
markersLineMarkerConf[]

TextOptions

NameTypeRequiredDescription
contentstring
styleCSSProperties
placementLineLabelPlacement

LineLabelConf

NameTypeRequiredDescription
ifstring | boolean | null
useBrickUseSingleBrickConf
placementLineLabelPlacement

LineConfOverrides

NameTypeRequiredDescription
activeLineConfOverridable
activeRelatedLineConfOverridable

LineConfOverridable

NameTypeRequiredDescription
strokeColorstring
strokeWidthnumber
interactStrokeWidthnumber

LineMarkerConf

NameTypeRequiredDescription
placementLineMarkerPlacement
typeLineMarkerType

LayoutOptionsDagre

extends BaseLayoutOptions
NameTypeRequiredDescription
rankdir"TB" | "BT" | "LR" | "RL"
ranksepnumber
edgesepnumber
nodesepnumber
align"UL" | "UR" | "DL" | "DR"

BaseLayoutOptions

NameTypeRequiredDescription
nodePaddingPartialRectTuple

LayoutOptionsForce

extends BaseLayoutOptions
NameTypeRequiredDescription
dummyNodesOnEdgesnumber
collideboolean | ForceCollideOptions

ForceCollideOptions

NameTypeRequiredDescription
dummyRadiusnumber
radiusDiffnumber
strengthnumber
iterationsnumber

ActiveTargetOfNode

NameTypeRequiredDescription
type"node"
nodeIdstring

ActiveTargetOfEdge

NameTypeRequiredDescription
type"edge"
edgeDiagramEdge

ConnectNodesOptions

extends NodesFilterOptions
NameTypeRequiredDescription
strokeColorstring
strokeWidthnumber
arrowboolean

NodesFilterOptions

NameTypeRequiredDescription
sourceTypestring | string[]
ifstring | boolean | null

DragNodesOptions

extends NodesFilterOptions
NameTypeRequiredDescription
saveUserViewQuery

UserViewQuery

NameTypeRequiredDescription
namespacestring
keystring

LineTarget

NameTypeRequiredDescription
idstring
edgeDiagramEdge

ConnectLineDetail

NameTypeRequiredDescription
sourceDiagramNode
targetDiagramNode

DiagramNodeId

string

LineType

"auto" | "curve" | "straight" | "polyline"

CurveType

`curve${string}`

LineLabelPlacement

"center" | "start" | "end"

LineMarkerPlacement

"start" | "end"

LineMarkerType

"arrow" | "circle" | "0..1" | "0..N"

LayoutOptions

LayoutOptionsDagre | LayoutOptionsForce

PartialRectTuple

number | [all: number] | [vertical: number, horizontal: number] | [top: number, horizontal: number, bottom: number] | [top: number, right: number, bottom: number, left: number]

ActiveTarget

ActiveTargetOfNode | ActiveTargetOfEdge

RangeTuple

[min: number, max: number]