feat(web): BodyWrapper compoent update PageLoading

This commit is contained in:
zhaoying
2026-01-29 15:57:59 +08:00
parent 4fe32b7dbc
commit cca3900678

View File

@@ -1,6 +1,6 @@
import type { FC, ReactNode } from 'react' import type { FC, ReactNode } from 'react'
import { Skeleton } from 'antd' import PageEmpty from './PageEmpty'
import Empty from './index' import PageLoading from './PageLoading'
interface BodyWrapperProps { interface BodyWrapperProps {
children: ReactNode children: ReactNode
@@ -9,10 +9,10 @@ interface BodyWrapperProps {
} }
const BodyWrapper: FC<BodyWrapperProps> = ({ children, loading = false, empty }) => { const BodyWrapper: FC<BodyWrapperProps> = ({ children, loading = false, empty }) => {
if (loading) { if (loading) {
return <Skeleton active /> return <PageLoading />
} }
if (!loading && empty) { if (!loading && empty) {
return <Empty /> return <PageEmpty />
} }
return children return children
} }