Appearance
Pinia
使用你现有的存储实现不是问题。你可以将元素存储在任何你正在使用的存储中,在那里对其进行修改,然后将结果传递给 Vue Flow。
¥Using your existing storage implementation is not an issue. You can store your elements in whatever store you're already using, mutate them there and pass the result to Vue Flow.
在本例中,我们使用 pinia 来存储元素、更新它们的位置以及切换类。
¥In this example we use pinia to store our elements, update their positions and toggle classes.