Vue.prototype.$EventBus = new Vue()

不建议用,尽量用vuex,eventbus过于消耗浏览器资源

傻瓜版状态管理

一般的状态传递是在同时显示的情况下,倘若是在不同时显示的情况下要处理好先后顺序

一定要记住在组件中销毁eventbus事件

https://www.w3cplus.com/vue/event-bus.html

https://blog.csdn.net/q3254421/article/details/82927860

 

相关文章:

  • 2021-06-22
  • 2021-11-11
  • 2022-12-23
  • 2022-02-14
  • 2021-08-21
  • 2022-01-28
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-15
  • 2022-12-23
  • 2021-10-10
  • 2021-09-28
  • 2021-12-05
  • 2021-12-13
相关资源
相似解决方案