ios滑动不流畅问题

使用插件better-scroller
使用手册:
html结构:

  • 这里写内容就行了

js

//在vue中的created中调用这两个方法即可
createScroller() {
      this.scroller = new BScroll(this.$refs.scroller, {
        click: true,
        probeType: 3
      });
    },
    bindEvents() {
      var scrollTop = this.$refs.scroller.scrollTop;
      let that = this;
      this.scroller.on("scrollEnd", e => {
        localStorage.getItem("scrollY") && localStorage.removeItem("scrollY");
        this.scrollY = e.y;
      });
      this.scroller.on("scroll", e => {
        this.searchMove = e.y < -4;
        this.searchBg = e.y < -96;
        this.pullDownRefresh = e.y > 40;
      });
      this.scroller.on("touchEnd", e => {
        //请求
    }

你可能感兴趣的:(ios滑动不流畅问题)