当前位置:网站首页>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 :
边栏推荐
- 带你刷(牛客网)C语言百题(第一天)
- JDBC database connection pool usage problem
- Anr principle and Practice
- Master-slave replication principle of MySQL
- ANR 原理及实践
- Leetcode T1165: 日志分析
- 2018 Jiangsu Vocational College skills competition vocational group "information security management and evaluation" competition assignment
- FullGC问题分析及解决办法总结
- 基于JS的迷宫小游戏
- 算法---比特位计数(Kotlin)
猜你喜欢
Matlab tips (30) nonlinear fitting lsqcurefit
品牌·咨询标准化
Answer to the first stage of the assignment of "information security management and evaluation" of the higher vocational group of the 2018 Jiangsu Vocational College skills competition
FPGA course: application scenario of jesd204b (dry goods sharing)
服装门店如何盈利?
Please answer the questions about database data transfer
数据资产管理与数据安全国内外最新趋势
The latest trends of data asset management and data security at home and abroad
2018年江苏省职业院校技能大赛高职组“信息安全管理与评估”赛项任务书
Graduation design game mall
随机推荐
ANR 原理及实践
请问 flinksql对接cdc时 如何实现计算某个字段update前后的差异 ?
子组件传递给父组件
2018 Jiangsu Vocational College skills competition vocational group "information security management and evaluation" competition assignment
Get the city according to IP
Common function detect_ image/predict
2022/07/04学习记录
Use of completable future
linux系统rpm方式安装的mysql启动失败
readonly 只读
This article introduces you to the characteristics, purposes and basic function examples of static routing
【NOI模拟赛】区域划分(结论,构造)
场馆怎么做体育培训?
Several index utilization of joint index ABC
Paranoid unqualified company
Libcurl returns curlcode description
toRefs API 与 toRef Api
js小练习----分时提醒问候、表单密码显示隐藏效果、文本框焦点事件、关闭广告
Algorithm --- bit count (kotlin)
Maze games based on JS