当前位置:网站首页>bus event bus use
bus event bus use
2022-08-10 10:23:00 【extreme~】
- Route
1) Each interface of the route is fixed in the corresponding navigation bar: a bus event bus is added to the nav component
eventBus.js
import Vue from 'vue'export default new Vue()
Introduced in navMain.vue
import eventBus from "@/utils/eventBus.js"created(){eventBus.$on("message", data => {console.log("A component passed to B component", data);this.toggleNav(data)});
Other interfaces should be quoted
import eventBus from "@/utils/eventBus.js"let param = { id: 1, key: 'xxx', path:`/xxx`, name: 'xxx' }eventBus.$emit("message", param)
边栏推荐
- 讯飞翻译机抢镜背后,跨语种沟通迈入全新时代
- ZZULIOJ 1116 Delete elements [delete]
- 【Software Exam System Architect】System Reliability Analysis and Design ① System Reliability Analysis
- 2022.8.8-----leetcode.761
- database transaction
- 2022.8.7-----leetcode.636
- 【FAQ】【Push Kit】 华为怎么设置角标
- Array of shell scripts
- 杭电多校七 1008-Triangle Game(博弈)
- Taro小程序跨端开发入门实战
猜你喜欢
随机推荐
LCD DRM component 框架分析
gin-gonic/gin使用详解
俄罗斯宣布临时禁止进口摩尔多瓦植物产品
Shell脚本数组
绘制温度曲线图;QChart,
反射效率为什么低?
ES复杂操作搜索
CSDN 21 Days Learning Challenge - Polymorphism (05)
ESP8266 教程1 — ESP8266硬件平台介绍
CSDN21天学习挑战赛——多态(05)
【微服务架构】微服务与SOA架构(2)
【Prometheus】Node Exporter常用查询PromQL 语句大总结
大连理工&鹏城&UAE提出用于伪装目标检测的混合尺度三重网络ZoomNet,性能SOTA!
91.(cesium之家)cesium火箭发射模拟
LCD模块如何建立联系分析
[C language] Header file #include
, conio is Console Input/Output (console input and output) 《MySQL高级篇》六、索引的创建与设计原则
LeetCode Algorithm 1721. 交换链表中的节点
「业务架构」TOGAF建模:组织分解图(组织映射)
Message Queuing Overview