微信小程序学习之triggerEvent
1.tag/index.wxml
<viewbind:tap="onTap"></view>
2.tag/index.js
properties:{text:String},methods:{onTap:function(event){this.triggerEvent("tapping",{text:this.propertie.text},{})}}
3.在父组件页面上要引入子组件
1.detail.wxml
<tap-cmpbind:tapping="onPost"></tap-cmp>
2.detail.js
onPost:function(event){event.detail.text}
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。