uni-app 上拉刷新
1.引入uni-app中uni-load-more.vue ,可按alt键点击引入的vue 查看使用的上拉刷新的代码import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';2.data 中定义loadingType// more = contentdown: "上拉显示更...
·
1.引入uni-app中uni-load-more.vue ,可按alt键点击引入的vue 查看使用的上拉刷新的代码
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
2.data 中定义 loadingType
// more = contentdown: "上拉显示更多",
// loading =contentrefresh: "正在加载...",
// nomore = contentnomore: "没有更多数据了"
data(){
return{
loadingType: 'more' //加载更多状态
}
}
3.页面底部加入上拉刷新时的标签
<uni-load-more :status="loadingType"></uni-load-more>
4.上拉刷新监听事件
onReachBottom() {
console.log("上滑动");
// more = contentdown: "上拉显示更多",
// loading =contentrefresh: "正在加载...",
// nomore = contentnomore: "没有更多数据了"
// 在此进行上拉刷新的业务逻辑
}
更多推荐
已为社区贡献5条内容
所有评论(0)