当前位置:网站首页>Pass child component to parent component
Pass child component to parent component
2022-07-07 07:09:00 【To be a woman of light】
1. What kind of situation does the sub component Zu Yao deliver content to the sub component ?
- When Some events occur in the subcomponent When , For example, a click occurs in a component , Parent component needs to switch content ;
- Child components There is something you want to pass to the parent component When ;
How do we complete the above operation ?
- First , We need to be in The name of the event to be triggered in some cases is defined in the sub component ;
- secondly , stay In parent component v-on Pass in the event name to listen , And bound to the corresponding method
- Last , When an event occurs in a subcomponent , Trigger the corresponding event according to the event name ;
Small cases :
When delivering events , You can also pass a parameter .
Receive and process this parameter :
边栏推荐
- Comment les entreprises gèrent - elles les données? Partager les leçons tirées des quatre aspects de la gouvernance des données
- 多个kubernetes集群如何实现共享同一个存储
- Tujia, muniao, meituan... Home stay summer war will start
- Academic report series (VI) - autonomous driving on the journey to full autonomy
- 带你刷(牛客网)C语言百题(第一天)
- AddressSanitizer 技术初体验
- Jetpack compose is much more than a UI framework~
- Multithreading and high concurrency (9) -- other synchronization components of AQS (semaphore, reentrantreadwritelock, exchanger)
- How does an enterprise manage data? Share the experience summary of four aspects of data governance
- Distributed ID solution
猜你喜欢
子组件传递给父组件
Abnova circulating tumor DNA whole blood isolation, genomic DNA extraction and analysis
MOS tube parameters μ A method of Cox
2018 Jiangsu Vocational College skills competition vocational group "information security management and evaluation" competition assignment
Anr principle and Practice
freeswitch拨打分机号源代码跟踪
2018年江苏省职业院校技能大赛高职组“信息安全管理与评估”赛项任务书第一阶段答案
JDBC database connection pool usage problem
Master-slave replication principle of MySQL
Brand · consultation standardization
随机推荐
Advantages of using net core / why
Anr principle and Practice
How can gyms improve their competitiveness?
关于数据库数据转移的问题,求各位解答下
算法---比特位计数(Kotlin)
Release notes of JMeter version 5.5
Multithreading and high concurrency (9) -- other synchronization components of AQS (semaphore, reentrantreadwritelock, exchanger)
SQLMAP使用教程(四)实战技巧三之绕过防火墙
The latest trends of data asset management and data security at home and abroad
MySQL user permissions
MySQL binlog related commands
详解机器翻译任务中的BLEU
Jetpack Compose 远不止是一个UI框架这么简单~
ANR 原理及实践
Learning records on July 4, 2022
After the promotion, sales volume and flow are both. Is it really easy to relax?
毕业设计游戏商城
请教一个问题,flink oracle cdc,读取一个没有更新操作的表,隔十几秒就重复读取全量数据
Unity3d learning notes
选择商品属性弹框从底部弹出动画效果