jerosoler / Drawflow

Simple flow library 🖥️🖱️
https://jerosoler.github.io/Drawflow/
MIT License
4.65k stars 722 forks source link

How do I access a node component from outside that component? #453

Closed cacious7 closed 2 years ago

cacious7 commented 2 years ago

I have a master component where all the nodes are being created. I want to access the Vue instance of an active node, such as on created, removed, or selected where the node id is provided.

In short, how do I match the id with a corresponding Vue component instance so that I can access the component properties?

jerosoler commented 2 years ago

I don't understand you.

Do you want to get the id?

View al issues vue:

cacious7 commented 2 years ago

no, not the id of the node. I want to get the actual Vue component instance associated with the node.

jerosoler commented 2 years ago

The component is mountend in drawflow_content_node for vue2 can be accessed by the variable vue.

View example:

For vue3 I don't know.