vue2.x
vue3.xtiny-emitter plugin usageInstall the plugin npm i tiny-emitter Import and use
setup(){ onMounted(()=>{ Monitoring: emitter.on('Monitoring method name', (parameters) => {callback function}) Trigger: emitter.emit('listening method name', parameters) Destruction: emitter.off('listening method name', parameter) }) } Mitt plugin usage1. Install npm install 2. Import and use
The above is the difference and usage of the communication bus between Vue2 and Vue3 brother components. For more information about the usage of the communication bus between Vue2 and Vue3 brother components, please pay attention to other related articles on 123WORDPRESS.COM! You may also be interested in:
|
<<: Example method to view the IP address connected to MySQL
>>: Analyze the working principle of Tomcat
Preface: In interviews for various technical posi...
The Linux seq command can generate lists of numbe...
From: https://blog.csdn.net/qq_44761243/article/d...
Preface Some of the earlier codes on Github may r...
1. Nginx installation steps 1.1 Official website ...
This article shares the specific code of js to ac...
CSS Houdini is known as the most exciting innovat...
Table of contents 1. Build using the official sca...
Linear-gradient background-image: linear-gradient...
Table of contents 1. Object change detection 2. Q...
MySQL 8.0 service cannot be started Recently enco...
Configuration steps 1. Check whether DNS is confi...
1. Introduction I have been studying the principl...
Table of contents 01 Introduction to MySQL Router...
Today we will implement a fragmented image loadin...