如题,根据数据遍历递归,不明确具体会遍历几次,形式大概如下:
<parent>
<children>
<children>
<children>
...
</children>
</children>
</children>
</parent>
我现在要在最后一层children传出数据到parent接收,但是emit只能向上传递一层,有什么好的解决方案吗?除了用vuex我没好的想法了
用eventBus 策略。
定义:
使用:
parent
children: