其他分享
首页 > 其他分享> > better-sroll使用

better-sroll使用

作者:互联网

功能:重点解决移动端(已支持 PC)各种滚动场景需求的插件
1、probeType:
//0,1:不侦测滚动
//2,手指触摸屏幕是侦测滚动
//3,手指离开屏幕依然侦测滚动
2、pullUpLoad=true(上拉加载更多)

实例应用:
1、封装模块

<template>
  <div class="wrapper" ref="wrapper">
    <div class="content"></div>
  </div>
</template>

<script>
import BScroll from "better-scroll";

export default {
  name: "Scroll",
  data() {
    return {
        scroll:null
    };
  },
  mounted(){
      this.scroll=new BScroll(this.$refs.wrapper,{
          probeType:3,
          pullUpLoad:true
      })
  }
};
</script>

<style scoped>
</style>

标签:sroll,滚动,probeType,better,使用,侦测,true,scroll
来源: https://blog.csdn.net/weixin_41768813/article/details/110286592