组件:
<scroll ref=“scroll"
class=“scrollCont”
:options=“options”
:data=“list”
@pulling-down=“onPullingDown”
@pulling-up=“onPullingUp”
:scroll-events=”[‘scroll’]"
@scroll=“onScrollHandle”
>
方法:
onScrollHandle (pos) {
this.pullDownY = pos.y
console.log(pos.y)
if (pos.y >=0) {
this.pullDownStyle = top:${pos.y}px
}
},
打印出来的pos.y一直是0,下拉刷新拉不动,问题出现在来回切换路由后