当前位置:网站首页>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)
边栏推荐
- LeetCode Algorithm 1403. 非递增顺序的最小子序列
- 2022.8.8-----leetcode.761
- ESP8266-Arduino编程实例-MQ-7一氧化碳传感器驱动
- 裸辞→自我放松→闭关→复习→斩获Offer
- dedecms supports one-click upload of Word content
- dedecms支持Word内容一键上传
- ESP8266 Tutorial 2 - Burn AT Firmware
- 2022.8.9-----leetcode.1413
- dos环境下操作mysql
- 【C语言】头文件#include <conio.h>,conio是Console Input/Output(控制台输入输出)
猜你喜欢
Tencent releases the second-generation version of the quadruped robot Max, which completes jumps and somersaults on the plum blossom pile
「第二部:容器和微服务架构」(1) 基于容器应用架构设计原则
14 high-frequency handwritten JS interview questions and answers to consolidate your JS foundation
SQL中的字符串截取函数
「敏捷建模」纪律:敏捷设计理念
「时序数据库」使用cassandra进行时间序列数据扫描
网络安全笔记5——数字签名
【Azure云】服务端点和私有链接有什么区别?观点(1)
90.(cesium之家)cesium高度监听事件
JS高级 之 Promise 详解
随机推荐
「业务架构」TOGAF建模:组织分解图(组织映射)
Matlab符号函数的生成及计算其函数值
bus事件总线 使用
vs2012创建WCF应用程序
【微服务架构】微服务与SOA架构(2)
owl.carousel海报卡片Slider轮播切换
交换 生成树 知识总结
多元线性回归分析(Stata)
「应用架构」TOGAF建模:企业可管理性图
属性动画QPropertyAnimation
【物联网架构】什么是物联网平台?
【STL】位图的介绍使用以及代码的模拟实现
ESP8266-Arduino编程实例-MQ-9 一氧化碳可燃气体传感器驱动
关于编程本质那些事
Plot temperature curves; QChart,
阻塞队列与线程池原理
[Internet of Things Architecture] The most suitable open source database for the Internet of Things
「第二部:容器和微服务架构」(1) 基于容器应用架构设计原则
WebView2 通过 PuppeteerSharp 实现爬取 王者 壁纸 (案例版)
LiveGBS操作日志页面快速的筛选上级平台的调用记录直播观看录像回看等操作