WeChat Mini Programs < scroll-view > cannot trigger the bindscroll event. The fixed height and sliding direction are set. Please solve the problem.
<scroll-view wx:if="{{isShow}}" class="showBigPic" scroll-x scroll-width-animation style="width:100%;height:{{scrollheight}}px" bindscroll="getScroll">
<block wx:for="{{cloudPic}}" wx:for-index="index" wx:for-item="item" wx:key="{{index}}">
<view style="height:{{scrollheight}}px"><image class="showBigPic" src="{{item.picId[0]}}" mode="widthFix" bindtap="closeBigPic"></image></view>
</block>
</scroll-view>
//
onLoad: function() {
var p = this
wx.getSystemInfo({
success: function(res){
p.setData({
scrollheight: res.windowHeight
})
}
})
}
getScroll: function(e){
//
console.log(e)
}
//
closeBigPic: function() {
this.setData({
isShow: false
})
},
data cloudPic is an array of image paths obtained by calling the database