小程序刷新组件

<!--在父页面中给子组件添加相应ID--!>
<rating bindmyevent="score" class="rating" data-type="push_score"></rating>
onPullDownRefresh: function () {  //下拉刷新
    this.selectComponent(".rating").clearAll();//获取组件id,调用组件内的方法
}, methods:{ clearAll:function(){ //做相应操作,如initData }, },

原文链接:https://blog.csdn.net/qq_34279442/article/details/105295650