Appearance
更新节点
¥Update Node
更新内部节点数据很简单。初始化元素并将其解析为 GraphNode
或 GraphEdge
后,Vue Flow 会将更改发送回你的初始 ref
。
¥Updating internal node data is simple. After initializing your elements and parsing them into either GraphNode
or GraphEdge
Vue Flow will emit the changes back into your initial ref
.
这意味着你可以操作原始节点的任何属性,并且它会触发图形中的变化。
¥That means you can manipulate any property of your original nodes, and it will trigger changes in the graph.
当然,你也可以直接从状态访问节点并从那里更改它们的属性。
¥You can of course also access the nodes directly from the state and change their properties from there.