✨ feat(邀请码): 完成邀请码模块

This commit is contained in:
xuan
2022-12-01 13:54:05 +08:00
parent 3ff32ee209
commit 7d3f6e22c5
19 changed files with 606 additions and 36 deletions
@@ -7,3 +7,6 @@
color: $color_font_three;
padding: 24px 0;
}
.empty{
padding: 100px;
}
+10 -2
View File
@@ -4,7 +4,7 @@ import Iconfont from '../iconfont/iconfont'
import LoadingCard from '../loadingCard/index'
import styles from './index.module.scss'
export type LoadMoreStatus = 'more' | 'loading' | 'noMore'
export type LoadMoreStatus = 'more' | 'loading' | 'noMore' | 'empty'
interface LoadMoreEvent {
onClick?: () => void
@@ -15,10 +15,11 @@ interface LoadMorePropsType extends LoadMoreEvent {
moreText?: string
loadingText?: string
noMoreText?: string
emptyText?: string
}
const LoadMore: FC<LoadMorePropsType> = (props) => {
const { status, moreText = '查看更多', loadingText = '加载中', noMoreText = '没有更多', onClick } = props
const { status, moreText = '查看更多', loadingText = '加载中', noMoreText = '没有更多', emptyText = '暂无数据', onClick } = props
const handleShowMore = () => {
onClick && onClick()
@@ -36,6 +37,13 @@ const LoadMore: FC<LoadMorePropsType> = (props) => {
</View>
)
}
else if (status === 'empty') {
component = (
<View className={styles.empty}>
<Text>{emptyText}</Text>
</View>
)
}
else {
component = <Text>{noMoreText}</Text>
}