Skip to content

Commit

Permalink
feat: ✨ 测试
Browse files Browse the repository at this point in the history
  • Loading branch information
G committed Dec 27, 2023
1 parent fb6c1b0 commit 46583e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions apps/admin/src/components/LazyLoad/src/LazyLoad.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import Loading from './Loading';
*/
const LazyLoad = (Component: LazyExoticComponent<React.FC<{}>>): ReactNode => {
return (
// <Suspense fallback={<Loading />}>
<Component />
// </Suspense>
<Suspense fallback={<Loading />}>
<Component />
</Suspense>
);
};

Expand Down
4 changes: 3 additions & 1 deletion apps/admin/src/router/routes/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { LayoutGuard } from '../guard';

import type { RouteObject } from '../types';

import HomePage from '@/views/home/index';

// Home route
const HomeRoute: RouteObject = {
path: '/home',
Expand All @@ -20,7 +22,7 @@ const HomeRoute: RouteObject = {
children: [
{
path: '',
element: LazyLoad(lazy(() => import('@/views/home'))),
element: <HomePage />,
meta: {
title: '首页',
key: 'home',
Expand Down

0 comments on commit 46583e9

Please sign in to comment.