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