会员
周边
众包
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
欢欢11
博客园
首页
新随笔
联系
订阅
管理
2019年8月17日
vue中使用Bus
摘要: //安装: npm install vue-bus1. // app.js var eventBus = { install(Vue,options) { Vue.prototype.$bus = new Vue() } }; Vue.use(eventBus); 2.然后在组件中,可以使用$emit, $on, $off 分别来分发、监听、取消...
阅读全文
posted @ 2019-08-17 09:43 欢欢11
阅读(541)
评论(0)
推荐(0)
编辑
公告