子组件:data:{show:true,},checkFun(){this.show=false}父组件:父组件使用子组件://获取子组件中的数据值constchild=this.selectComponent('#child');console.log(child.data.show);//调用子组件的useChildFun方法(){this.选择组件('#child')。检查乐趣();}
微信小程序获取子组件data中的数据值和方法相关文章