uniapp scroll-view下拉后不回弹,一直加载中

uniapp yekong

uniapp 微信小程序,下拉刷新的状态是由refresher-triggered控制的,refresher-triggered的初始值为false,要先变为true,执行完刷新操作之后再变为false才会有效果,所以在自定义下拉刷新控件被下拉时触发的事件中将值置为true并加一些延时再变为false才有了效果。

<scroll-view
scroll-y="true"
refresher-enabled="true"
:refresher-triggered="triggered"
@refresherpulling="onPulling"
@refresherrefresh="onRefresh"
>
</scroll-view>
that.triggered = true
setTimeout(() => {
	that.triggered = false
}, 2000);
喜欢