fix: content does not render elements during loading
This commit is contained in:
@@ -90,10 +90,11 @@ export function SettingProvider({ children, isSettingPage }) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return <Loading />;
|
return isSettingPage ? <Loading /> : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!setting) {
|
if (!setting) {
|
||||||
|
return isSettingPage ? (
|
||||||
<center>
|
<center>
|
||||||
<Alert severity="error" sx={{ maxWidth: 600, margin: "60px auto" }}>
|
<Alert severity="error" sx={{ maxWidth: 600, margin: "60px auto" }}>
|
||||||
<p>数据加载出错,请刷新页面或卸载后重新安装。</p>
|
<p>数据加载出错,请刷新页面或卸载后重新安装。</p>
|
||||||
@@ -102,7 +103,8 @@ export function SettingProvider({ children, isSettingPage }) {
|
|||||||
reinstall.
|
reinstall.
|
||||||
</p>
|
</p>
|
||||||
</Alert>
|
</Alert>
|
||||||
</center>;
|
</center>
|
||||||
|
) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user