当前位置:网站首页>小程序学习笔记:小程序组件间通信方式
小程序学习笔记:小程序组件间通信方式
2022-08-10 05:31:00 【梵鸽子】
小程序组件间通信方式
- 父组件访问子组件,通过this.selectComponent(".component").setIndex(index),setIndex为子组件定义的方法,可以利用setIndex来修改组件内部数据。
- 子组件定义父组件触发事件:triggerEvent(eventName, detail),eventName为自定义事件名称,detail为事件携带参数信息
this.triggerEvent('clickTabControl', {
'index': index
}, {})
父级在使用子组件时就可以绑定该自定义事件
<w-tab-control class='tab-control-temp' titleArr="{ {titleArr}}" bind:clickTabControl="clicktabcontrol" />
边栏推荐
- 再肝3天,整理了90个 NumPy 例子,不能不收藏!
- 【论文笔记1】小样本分类
- FPGA engineer interview questions collection 11~20
- FPGA engineer interview questions collection 21~30
- 虚拟土地价格暴跌85% 房地产泡沫破裂?依托炒作的暴富游戏需谨慎参与
- You can‘t specify target table ‘kms_report_reportinfo‘ for update in FROM clause
- SSM框架整合实例
- Touch chip used in smart touch remote control
- 使用Tenserboard可视化深度学习训练过程
- 看了几十篇轻量化目标检测论文扫盲做的摘抄笔记
猜你喜欢
随机推荐
FPGA engineer interview questions collection 21~30
Qiskit学习笔记(三)
训练集Loss收敛,但是测试集Loss震荡的厉害?
文章复现:超分辨率网络-VDSR
Important transformation and upgrading
小记录:Pytorch做深度学习必要加载的包
Zhongang Mining: Strong downstream demand for fluorite
matlab中的常用的类型转换
来亲自手搭一个ResNet18网络
使用Tenserboard可视化深度学习训练过程
pytorch框架学习(2)使用GPU训练
R语言:修改chart.Correlation()函数绘制相关性图——完美出图
pytorch框架学习(1)网络的简单构建
How to use Apifox's Smart Mock function?
Touch chip used in smart touch remote control
Shield Alt hotkey in vscode
三维点云分割
AVL树的插入--旋转笔记
PyTorch 入门之旅
Qiskit 学习笔记1