前提:使用vue-cli搭建的vue项目
功能: 实现上拉加载 下拉刷新
mescroll官网:http://www.mescroll.com/
可从官网下载案例 复制代码更改
使用步骤
一、安装
npm install --save mescroll.js
二、在页面中引入
image.png
三、在页面HTML中加入组件
image.png
四、在data中实例
image.png
五、在methods中写方法
image.png
image.png
六、在mouted中初始化数据,调用方法
image.png
七、在css中定位(必须要用定位)
image.png