微信小程序子组件传参给父组件
作者:互联网
父组件:
<tpupload bind:tpuploadFun="tpupload1" imgs="{{imgs}}" tpNum='9' ></tpupload>
// 事件可以拿到传来的参数
tpupload1(e){ console.log(e.detail.imgs, '这个是子组件传递来的数据')
},
子组件:触发父组件事件,并传参
that.triggerEvent('tpuploadFun',{ imgs:imgs })
标签:传参,tpuploadFun,微信,tpupload1,imgs,组件,是子 来源: https://www.cnblogs.com/lude1994/p/14883288.html