pref: 权限校验中 - 显示占位骨架,不显示登录按钮或用户菜单,/home页面添加骨架屏逻辑
This commit is contained in:
26
src/views/Home/index.tsx
Normal file
26
src/views/Home/index.tsx
Normal 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;
|
||||
Reference in New Issue
Block a user