uniapp分页u-loadmore加载更多uview-ui小程序分页app分页处理

uniapp分页u-loadmore加载更多uview-ui,小程序分页app分页处理

1.前端自定义分页条数传page、pageSize参数给后端,根据第一页、总条数判断

<template>
	<view>
		<!-- 页面 -->
		<u-loadmore class="loadmore" :status="status" :icon-type="iconType" :load-text="loadText" />
	</view>

</template>
<script>
	export default {
		data() {
			return {
				page: 1,//当前页
				pageSize: 10,//每页条数
				status: 'loadmore', //加载的状态
				iconType: 'flower', //加载菊花icon
				loadText: {
					loadmore: '轻轻上拉',
					loading: '努力加载中',
					nomore: '实在没有了'
				},
				cateringList: [], //商家列表
			}
		}
	}



	//分页触底
	onReachBottom() {
			//正在加载或加载完退出
			if (this.status == 'loading' || this.status == 'nomore') {
				return
			}
	

猜你喜欢

转载自blog.csdn.net/qq_39695210/article/details/129376572