滚动视图在手机上滚动时有白块,滚完就没有了,怎么不产生白块
发布于 5 年前 作者 jingyi 8018 次浏览 来自 问答

向上滚动视图区域在手机上向上滚动时有白块,滚完就没有了,怎么不产生白块

<scroll-view class=“main_container” scroll-y scroll-top="{{scrollTop}}" bindscroll=“scroll” bindscrolltolower=“scrolltolower”>

*************************************

</scroll-view>

就是这个组件

  data: {

        scrollTop: 0,

       value: [9999, 1, 1],

      indicatorDots: false,

    },

.JS

goTop: function(e) {

    this.setData({

      scrollTop: 0

    })

  },

  scroll: function(e, res) {

    // 容器滚动时将此时的滚动距离赋值给 this.data.scrollTop

    if (e.detail.scrollTop > 500) {

      this.setData({

        floorstatus: true

      });

    } else {

      this.setData({

        floorstatus: false

      });

    }

  },

  scrolltolower: function(event) {

    wx.showToast({

      title: ‘我也是有底限的’,

      icon: ‘success’,

      duration: 2000

    })

  },

哪个老师帮忙看看

谢谢

1 回复

从贴的代码不能复现您所说的现象,建议提供一个相关的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html),我们定位下问题

回到顶部