Svelte Flow

学习参考示例
GitHub 中文支持我们
  • API 参考
  • <SvelteFlow />
  • <SvelteFlowProvider />
  • 组件
    • <Background />
    • <BaseEdge />
    • <ControlButton />
    • <Controls />
    • <EdgeLabelRenderer />
    • <EdgeLabel />
    • <Handle />
    • <MiniMap />
    • <NodeResizer />
    • <NodeResizeControl />
    • <NodeToolbar />
    • <Panel />
  • 钩子
    • useConnection()
    • useEdges()
    • useHandleConnections()
    • useInternalNode()
    • useNodes()
    • useNodesData()
    • useNodesInitialized()
    • useSvelteFlow()
    • useStore()
    • useUpdateNodeInternals()
  • 类型
    • BackgroundVariant
    • ColorMode
    • Connection
    • ConnectionLineType
    • CoordinateExtent
    • DefaultEdgeOptions
    • Edge
    • EdgeMarker
    • EdgeProps
    • FitViewOptions
    • InternalNode
    • KeyDefinition
    • MarkerType
    • Node
    • NodeProps
    • NodeOrigin
    • PanelPosition
    • Position
    • SvelteFlowStore
    • Viewport
    • XYPosition
    • addEdge()
    • getBezierPath()
    • getConnectedEdges()
    • getIncomers()
    • getNodesBounds()
    • getOutgoers()
    • getSimpleBezierPath()
    • getSmoothStepPath()
    • getStraightPath()
    • getViewportForBounds()
    • isEdge()
    • isNode()

本页内容

  • 签名
有疑问?给我们反馈 →编辑此页面这里有什么新内容?
参考钩子
useNodes()

useNodes

GitHub 上的源代码

这个钩子返回当前节点数组的存储。当您订阅此存储时,它将在节点数组发生更改时触发。这发生在添加、删除或更新节点(例如拖动)时。

<script lang="ts">
  import { useNodes } from '@xyflow/svelte';
 
  const nodes = useNodes();
</script>

签名

名称类型
#返回值
#
Writable<Node[]>
当前节点存储。
钩子

xyflow 团队的项目

自 2019 年以来,我们一直在构建和维护用于基于节点的 UI 的开源软件。

文档

快速入门指南API 参考示例展示支持我们

社交

DiscordGithubX / TwitterBluesky

xyflow

博客开源关于联系
职业 招聘中

法律

MIT 许可证行为准则

info@xyflow.com — 版权所有 ©2024 webkid GmbH。保留所有权利 — 网站设计由 Facu Montanaro