mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 11:52:08 +08:00
feat: 新增 RenderEmpty 组件
This commit is contained in:
@@ -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;
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user