Commit 7ea1f4d0 authored by chenshouchao's avatar chenshouchao

fix: MyCircularProgress组件逻辑修复

parent ff0421f5
...@@ -63,48 +63,48 @@ const MyCircularProgress = (props: IMyCircularProgressProps) => { ...@@ -63,48 +63,48 @@ const MyCircularProgress = (props: IMyCircularProgressProps) => {
</div> </div>
); );
} else { } else {
if (children) { return (
return children; <div
} else { style={{
return ( width: "100%",
height: "100%",
position: "absolute",
top: 0,
zIndex: zIndex,
minHeight: minHeight,
}}
>
<div <div
style={{ style={{
width: "100%", width: "100%",
height: "100%", height: "100%",
position: "absolute", position: "absolute",
top: 0, top: 0,
zIndex: zIndex, opacity: 0.6,
minHeight: minHeight, background: "#fff",
}}
></div>
<div
style={{
width: "100%",
height: "100%",
display: "flex",
justifyContent: "center",
alignItems: "center",
maxHeight: maxHeight,
}} }}
> >
<div <CircularProgress></CircularProgress>
style={{
width: "100%",
height: "100%",
position: "absolute",
top: 0,
opacity: 0.6,
background: "#fff",
}}
></div>
<div
style={{
width: "100%",
height: "100%",
display: "flex",
justifyContent: "center",
alignItems: "center",
maxHeight: maxHeight,
}}
>
<CircularProgress></CircularProgress>
</div>
</div> </div>
); </div>
} );
} }
} else { } else {
return null; if (children) {
return children;
} else {
return null;
}
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment