Due to recursive components, this kind of nesting will occur
<tree>
<tree>
<tree>
</tree>
</tree>
</tree>
It’s easy to select the outermost one. Dynamically register a Vuex module. Whichever one is clicked will be passed to this module.
But it is troublesome to implement click and $emit events in the tree structure. They are nested layer by layer and it is almost impossible to broadcast
Please tell me how to solve this problem
淡淡烟草味2017-06-30 10:01:45
The officially recommended approach is to use a Vue instance as the event bus.