This commit is contained in:
quantulr
2023-09-01 17:14:27 +08:00
parent a09291a1c8
commit cf3e2db09d
27 changed files with 308 additions and 330 deletions

View File

@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"t-loading": "tdesign-miniprogram/loading/loading"
}
}

View File

@ -0,0 +1,15 @@
/* components/load-more/index.wxss */
.load-more {
width: 100%;
display: flex;
justify-content: center;
padding: 12rpx 0;
.status {
display: flex;
align-items: center;
text {
margin-left: 12rpx;
font-size: small;
}
}
}

View File

@ -0,0 +1,21 @@
// components/load-more/index.ts
Component({
/**
* 组件的属性列表
*/
properties: {
status: {
type: Number, // 0 loading,1 success, 3 error, 4:completed
},
},
/**
* 组件的初始数据
*/
data: {},
/**
* 组件的方法列表
*/
methods: {},
});

View File

@ -0,0 +1,12 @@
<!--components/load-more/index.wxml-->
<view class="load-more">
<t-loading wx:if="{{status==0}}" theme="circular" size="40rpx" text="加载中..." class="wrapper" />
<view wx:elif="{{status==1}}" class="status success">
</view>
<view wx:elif="{{status==2}}" class="status error">
<t-icon name="unhappy" color="#d54941" size="16" /><text>加载失败</text>
</view>
<view wx:elif="{{status==3}}" class="status completed">
<t-icon name="thumb-up-2" color="#2ba471" size="16" /><text>没有更多</text>
</view>
</view>