Skip to content

拖放

🌐 Drag & Drop

向已有图中添加节点可以有多种方法。要创建交互式编辑器,你可能希望通过拖放来插入节点。

🌐 Adding nodes to an already existing graph can be done multiple ways. To create an interactive editor, you would probably like them to be inserted with drag and drop.

在本例中,我们演示了如何构建一个基本的侧边栏,并实现拖放处理程序来创建新节点。

🌐 In this example we demonstrate how to build a basic Sidebar and implement drag and drop handlers to create new nodes.

状态访问

🌐 State access

这个例子展示了 Vue Flow 的另一个关键特性。你可以在 VueFlow 组件实际挂载之前的任何时间初始化 Flow 状态。这可以通过使用 useVueFlow 组合式函数来实现。

🌐 This example shows another key feature of Vue Flow. You can initialize the Flow state at any point before the VueFlow component is actually mounted. This can be achieved by using the useVueFlow composable.

VueFlow 中文网 - 粤ICP备13048890号