fix(layout): 修复顶栏连点和头像菜单抖动,统一三中心侧栏加载态
This commit is contained in:
+9
-5
@@ -5,6 +5,7 @@ import {
|
||||
isMiniProgramWebView,
|
||||
} from './helpers/miniProgram';
|
||||
import Loading from './components/common/ui/Loading';
|
||||
import { CenterRouteLoading } from './components/layout/components/CenterSidebarLoading';
|
||||
import {
|
||||
AuthRedirect,
|
||||
PrivateRoute,
|
||||
@@ -829,14 +830,17 @@ function App() {
|
||||
moduleAuthConfig.keyManagement ? (
|
||||
<PrivateRoute>
|
||||
<Suspense
|
||||
fallback={<Loading></Loading>}
|
||||
fallback={<CenterRouteLoading />}
|
||||
key={location.pathname}
|
||||
>
|
||||
<UserCenter keyManagementMode />
|
||||
</Suspense>
|
||||
</PrivateRoute>
|
||||
) : (
|
||||
<Suspense fallback={<Loading></Loading>} key={location.pathname}>
|
||||
<Suspense
|
||||
fallback={<CenterRouteLoading />}
|
||||
key={location.pathname}
|
||||
>
|
||||
<UserCenter keyManagementMode />
|
||||
</Suspense>
|
||||
)
|
||||
@@ -847,12 +851,12 @@ function App() {
|
||||
element={
|
||||
moduleAuthConfig.userCenter ? (
|
||||
<PrivateRoute>
|
||||
<Suspense fallback={<Loading></Loading>}>
|
||||
<Suspense fallback={<CenterRouteLoading />}>
|
||||
<UserCenter />
|
||||
</Suspense>
|
||||
</PrivateRoute>
|
||||
) : (
|
||||
<Suspense fallback={<Loading></Loading>}>
|
||||
<Suspense fallback={<CenterRouteLoading />}>
|
||||
<UserCenter />
|
||||
</Suspense>
|
||||
)
|
||||
@@ -956,7 +960,7 @@ function App() {
|
||||
element={
|
||||
<PrivateRoute>
|
||||
{isOrgCenterAvailable ? (
|
||||
<Suspense fallback={<Loading />}>
|
||||
<Suspense fallback={<CenterRouteLoading />}>
|
||||
<Organization />
|
||||
</Suspense>
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user