当前位置:网站首页>Mini Program Study Notes: Communication between Mini Program Components
Mini Program Study Notes: Communication between Mini Program Components
2022-08-10 05:48:00 【Brahma pigeon】
Communication method between applet components
- The parent component accesses the child component through this.selectComponent(".component").setIndex(index), setIndex is a method defined by the child component, and setIndex can be used to modify the internal data of the component.
- The child component defines the parent component trigger event: triggerEvent(eventName, detail), eventName is the custom event name, detail is the event carrying parameter information
this.triggerEvent('clickTabControl', {
'index': index
}, {})
The parent can bind the custom event when using the child component
边栏推荐
猜你喜欢
随机推荐
Batch add watermark to pictures batch add background zoom batch merge tool picUnionV4.0
你不知道的常规流
R绘制图像,图像特征提取
Bifrost 同步数据库实现微服务跨库数据同步
Collection工具类
R语言:修改chart.Correlation()函数绘制相关性图——完美出图
Multi-table query Notes
Module build failed TypeError this.getOptions is not a function报错解决方案
Index Notes【】【】
安装Robotics-toolbox-matlab, for 点云坐标系转换
链读推荐:从瓷砖到生成式 NFT
IDEA 项目中设置 Sources Resources 等文件夹
Canal 报错 Could not find first log file name in binary log index file
链读好文:Jeff Garzik 推出 Web3 制作公司
Chain Reading|The latest and most complete digital collection sales calendar-08.02
impdp 导入数据
ZigBee 网络设备相关内容
R中设置图形参数--函数par()详解
Reprint fstream, detailed usage of ifstream
去中心化和p2p网络以及中心化为核心的传统通信