Merge pull request #733 from SuanmoSuanyangTechnology/fix/v0.2.9_zy

fix(web): BodyWrapper add init height class
This commit is contained in:
yingzhao
2026-03-30 16:32:40 +08:00
committed by GitHub
2 changed files with 7 additions and 6 deletions

View File

@@ -24,16 +24,17 @@ interface BodyWrapperProps {
/** Whether to show loading state */ /** Whether to show loading state */
loading?: boolean loading?: boolean
/** Whether the content is empty */ /** 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 // Show loading spinner while data is being fetched
if (loading) { if (loading) {
return <PageLoading /> return <PageLoading className={className} />
} }
// Show empty state when no data is available // Show empty state when no data is available
if (!loading && empty) { if (!loading && empty) {
return <PageEmpty /> return <PageEmpty className={className} />
} }
// Render actual content when data is loaded and available // Render actual content when data is loaded and available
return children return children

View File

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