{ showEdgePanel = true; currentEdge = e.edge; }} onbeforeconnect={(edge) => { return { ...edge, id:genShortId(), } }} ondelete={onDelete} onclick={(e) => { const el = e.target as HTMLElement; if (el.classList.contains("svelte-flow__edge-interaction") || el.classList.contains('panel-content') || el.closest('.panel-content')){ return } showEdgePanel = false; currentEdge = null; }} defaultEdgeOptions={{ // animated: true, // label: 'edge label', markerEnd: { type: MarkerType.ArrowClosed, // color: 'red', width: 20, height: 20 } }} > {#if showEdgePanel}
边属性设置
边条件设置