feat: 新增 RenderEmpty 组件

This commit is contained in:
GraceWalk
2022-09-13 14:04:55 +08:00
parent 731429c51c
commit 863b765e0d
2 changed files with 37 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import React from 'react';
const RenderEmpty = (props: { height?: string | number; message: string }) => {
const { height = 200, message } = props;
return (
<>
<div className="empty-panel" style={{ height }}>
<div className="img" />
<div className="text">{message}</div>
</div>
</>
);
};
export default RenderEmpty;

View File

@@ -258,3 +258,25 @@ li {
}
}
}
.empty-panel {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-bottom: 18px;
.img {
width: 51px;
height: 34px;
margin-bottom: 7px;
background-size: cover;
background-image: url('./assets/empty.png');
}
.text {
font-size: 10px;
color: #919aac;
line-height: 20px;
}
}