feat:
This commit is contained in:
@ -1,2 +1,28 @@
|
||||
@import '@/styles/common.less';
|
||||
@import '@/styles/variables.less';
|
||||
@import '@/styles/variables.less';
|
||||
|
||||
.job-manage-list {
|
||||
&__empty-tips {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
padding-top: 218px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
|
||||
&__icon {
|
||||
width: 386px;
|
||||
height: 278px;
|
||||
}
|
||||
|
||||
&__describe {
|
||||
font-size: 28px;
|
||||
font-weight: 500;
|
||||
line-height: 40px;
|
||||
color: @blColor;
|
||||
margin-top: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { Image } from '@tarojs/components';
|
||||
import Taro from '@tarojs/taro';
|
||||
|
||||
import { List, PullRefresh } from '@taroify/core';
|
||||
@ -28,7 +29,15 @@ const FIRST_PAGE = 0;
|
||||
const PAGE_SIZE = 40;
|
||||
const PREFIX = 'job-manage-list';
|
||||
const log = logWithPrefix(PREFIX);
|
||||
|
||||
const EmptyTips = (props: { className?: string; height?: number }) => {
|
||||
const { className, height } = props;
|
||||
return (
|
||||
<div className={classNames(`${PREFIX}__empty-tips`, className)} style={height ? { height } : undefined}>
|
||||
<Image className={`${PREFIX}__empty-tips__icon`} src={require('@/statics/svg/empty-box.svg')} mode="aspectFit" />
|
||||
<div className={`${PREFIX}__empty-tips__describe`}>当前还没有通告</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
function JobManageList(props: IJobManageListProps) {
|
||||
const { className, listHeight, refreshDisabled, visible = true, status, onListEmpty } = props;
|
||||
const [refreshing, setRefreshing] = useState(false);
|
||||
@ -151,6 +160,8 @@ function JobManageList(props: IJobManageListProps) {
|
||||
onRefresh={handleRefresh}
|
||||
disabled={refreshDisabled}
|
||||
>
|
||||
{Boolean(!dataList.length) && <EmptyTips className={className} height={listHeight} />}
|
||||
|
||||
<List
|
||||
hasMore={hasMore}
|
||||
onLoad={handleLoadMore}
|
||||
|
||||
Reference in New Issue
Block a user