缓加载优化

This commit is contained in:
unknown
2023-07-24 10:15:23 +08:00
parent 79982b0ca8
commit 86972e55a3
7 changed files with 69 additions and 24 deletions

View File

@@ -1,6 +1,6 @@
.loading-parent-box {
width: 100vd;
height: 100vh;
text-align: center;
.loading-box {
width: 100vw;
line-height: 100vh;
text-align: center;
}

View File

@@ -1,11 +1,20 @@
import { Spin } from "antd";
import styles from "./index.module.less";
const LoadingPage = () => {
interface PropsInterface {
height?: string;
}
const LoadingPage = (props: PropsInterface) => {
return (
<div className={styles["loading-parent-box"]}>
<Spin size="large" />
</div>
<>
<div
className={styles["loading-box"]}
style={{ height: props.height || "100vh" }}
>
<Spin size="large" />
</div>
</>
);
};