scroll-view设置scroll-top为0实现滚动返回顶部后组件无法向下滚动?
wxml
<scroll-view
scroll-y="true"
enable-back-to-top="true"
scroll-with-animation="true"
scroll-top="{{top_num}}"
bindscroll="scroll_distance">
</scroll-view>
<view bindtap="backtop" wx:if="{{showBackTop}}">
<icon></icon>
</view>
js
Page({
data : {
showBackTop : false
top_num : 0,
},
scroll_distance: function(event) {
this.setData({
showBackTop: event.detail.scrollTop > 300 ? true : false
})
},
backtop : function(){
this.setData({top_num:0})
}
})
小程序基础库v2.10.1
微信版本7.0.10
4 回复