pref: 权限校验中 - 显示占位骨架,不显示登录按钮或用户菜单,/home页面添加骨架屏逻辑

This commit is contained in:
zdl
2025-11-26 09:57:20 +08:00
parent 601b06d79e
commit 84f70f3329
4 changed files with 163 additions and 145 deletions

26
src/views/Home/index.tsx Normal file
View File

@@ -0,0 +1,26 @@
/**
* 首页入口组件
* 使用专用骨架屏作为 Suspense fallback优化加载体验
*
* @module views/Home
*/
import React, { Suspense, lazy } from 'react';
import { HomePageSkeleton } from './components/HomePageSkeleton';
// 懒加载实际首页组件
const HomePage = lazy(() => import('./HomePage'));
/**
* 首页入口 - 带骨架屏的懒加载包装
* 使用深色风格骨架屏,与首页视觉风格一致
*/
const HomePageEntry: React.FC = () => {
return (
<Suspense fallback={<HomePageSkeleton />}>
<HomePage />
</Suspense>
);
};
export default HomePageEntry;