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
The basics of MySQL knowledge points for the seco...
background In the group, some students will ask r...
This article shares the specific code of MySQL 8....
After MySQL is installed, you can verify whether ...
1. Enter the virtualization vcenter, log in with ...
Record some of the processes of using node-media-...
Table of contents 1. In project development, the ...
Table of contents question: There are 2 tokens in...
Preface: Docker is an open source application con...
The knowledge points summarized below are all fre...
Introduction The Docker-Compose project is an off...
Preface This article contains 1. Several major co...
1. Simple configuration of nginx's dynamic an...
Table of contents Environmental conditions Errors...
Install jdk: Oracle official download https://www...