Skip to content

t-loadmore

Loadmore 加载更多

组件介绍

加载更多组件,指示用户可以加载内容的状态,支持多种状态和装饰元素,并可配置尺寸和样式。

平台兼容

HarmonyH5AndroidiOS小程序UTS

基础用法

vue
<template>
  <view class="loadmore-demo">
    <t-loadmore :status="0" :line="true"></t-loadmore>
    <t-loadmore :status="1" :line="true"></t-loadmore>
    <t-loadmore :status="2" :line="true"></t-loadmore>
  </view>
</template>

<style scoped>
.loadmore-demo {
  padding: 40rpx;
}
</style>

Props

属性名类型默认值说明可选值
sizeString"medium"组件尺寸large, medium, small, mini
typeString"primary"组件类型info, primary, error, warning, success
disabledBooleanfalse组件是否禁用true, false
hoverBooleanfalse是否有点击效果true, false
pathString""点击组件后跳转的页面路径-
effectString"normal"组件显示主题normal, dark, light, plain
lineBooleanfalse是否显示分隔线true, false
lineClassString""分隔线样式-
lineStyleString"solid"分隔线类型solid, dashed, dotted, double
statusNumber1组件状态0: 加载前, 1: 加载中, 2: 没有更多
loadingClassString""加载中的图标样式-
loadmoreTextString"上拉加载更多"加载前的提示文本-
loadingTextString"加载中"加载中的提示文本-
nomoreTextString"页面有限,服务不止"没有更多的显示文本-

Events

事件名说明回调参数
click点击时触发-
transitionend动画结束时触发-
initFinished组件初始化完成触发组件的节点信息
touchstart触摸开始时触发触摸事件对象
touchend触摸结束时触发触摸事件对象
touchmove触摸移动时触发触摸事件对象
touchcancel触摸取消时触发触摸事件对象

Status 说明

状态值说明显示文本
0加载前loadmoreText
1加载中loadingText
2没有更多nomoreText