fix(web): BodyWrapper add init height class

This commit is contained in:
zhaoying
2026-03-30 16:31:23 +08:00
parent c7b51e7ad8
commit 09b3b01d37
2 changed files with 7 additions and 6 deletions

View File

@@ -24,16 +24,17 @@ interface BodyWrapperProps {
/** Whether to show loading state */
loading?: boolean
/** Whether the content is empty */
empty: boolean
empty: boolean;
className?: string;
}
const BodyWrapper: FC<BodyWrapperProps> = ({ children, loading = false, empty }) => {
const BodyWrapper: FC<BodyWrapperProps> = ({ children, loading = false, empty, className = 'rb:max-h-[calc(100%-48px)]!' }) => {
// Show loading spinner while data is being fetched
if (loading) {
return <PageLoading />
return <PageLoading className={className} />
}
// Show empty state when no data is available
if (!loading && empty) {
return <PageEmpty />
return <PageEmpty className={className} />
}
// Render actual content when data is loaded and available
return children

View File

@@ -78,7 +78,7 @@ export default function UserMemory() {
}, [search, data])
return (
<div>
<>
<Form form={form}>
<Row gutter={16} className="rb:mb-4">
<Col span={8}>
@@ -137,6 +137,6 @@ export default function UserMemory() {
})}
</Row>
</BodyWrapper>
</div>
</>
);
}