fix(layout): 修复顶栏连点和头像菜单抖动,统一三中心侧栏加载态

This commit is contained in:
zhanjunhao
2026-11-27 16:59:53 +08:00
parent 3a0d9e15cd
commit 5a9d6ae3cb
18 changed files with 459 additions and 137 deletions
+9 -5
View File
@@ -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>
) : (