摘要: 首先在main.js中app实例中使用生命周期钩子添加组件 new Vue({ router, render: h => h(App), beforeCreate() { Vue.prototype.$bus=this; //安装事件总线 }, }).$mount('#app') 然后在创建的组件添 阅读全文
posted @ 2022-03-16 21:15 脆 阅读(296) 评论(0) 推荐(0) 编辑