Skip to content

m-loadmore 加载更多

简述

列表滚动到底部加载更多提示。

注意

请以 uni_modules/m-unix 与本文为准;各端差异以 uni-app 与各平台官方文档为准。涉及隐私能力(相册、定位、剪贴板、手机号等)需在 manifest 与后台完成配置。

平台差异说明

App(vue)App(nvue)H5小程序

演示地址

与线上 H5 演示基座 分包一致(文档站右下角预览 iframe 亦指向同一路径)。

类型地址
分包路径pages_demo/extensions/extensions
线上 H5(hash)打开演示

基本使用

uvue
<template>
	<view>
		<scroll-view scroll-y @scrolltolower="loadMore">
			<!-- 列表内容 -->
			<m-loadmore :status="status"></m-loadmore>
		</scroll-view>
	</view>
</template>

Props

参数说明类型默认值
status状态 loading / nomore / errorstringnomore
loadingText加载中文字string加载中...
nomoreText没有更多文字string已经到底了
errorText加载失败文字string加载失败,点击重试

Events

事件名说明
retry加载失败点击重试

示例

加载中

uvue
<m-loadmore status="loading"></m-loadmore>

没有更多

uvue
<m-loadmore status="nomore"></m-loadmore>

加载失败

uvue
<m-loadmore status="error" @retry="loadMore"></m-loadmore>

Released under the MIT License.