style: list block style improve (#4785)

This commit is contained in:
Katherine 2024-07-01 16:38:02 +08:00 committed by GitHub
parent 59c9c0e06e
commit 12a8f2e6ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 37 additions and 45 deletions

View File

@ -358,16 +358,7 @@ export const Grid: any = observer(
return (
<FilterBlockProvider>
<GridContext.Provider value={gridContextValue}>
<div
className={cls(
'nb-grid-container',
// css`
// & {
// margin-bottom: ${designable ? 0 : -token.marginLG}px;
// }
// `,
)}
>
<div className={cls('nb-grid-container')}>
<div className={cls(`nb-grid ${styles.container}`)} style={{ position: 'relative' }} ref={gridRef}>
<div className="nb-grid-warp">
<DndWrapper dndContext={props.dndContext}>

View File

@ -75,46 +75,47 @@ const InternalList = (props) => {
componentCls,
hashId,
css`
.ant-spin-nested-loading {
.nb-list-container {
height: ${height ? height + 'px' : '100%'};
overflow-y: ${height ? 'auto' : 'null'};
.ant-spin-container {
width: 100%;
overflow-x: clip;
padding-right: ${token.paddingSM + 'px'};
}
overflow-y: auto;
margin-left: -${token.marginLG}px;
margin-right: -${token.marginLG}px;
padding-left: ${token.marginLG}px;
padding-right: ${token.marginLG}px;
}
`,
)}
>
<AntdList
{...props}
pagination={
!meta || meta.count <= meta.pageSize
? false
: {
onChange: onPaginationChange,
total: meta?.count || 0,
pageSize: meta?.pageSize || 10,
current: meta?.page || 1,
}
}
loading={service?.loading}
>
{field.value?.length
? field.value.map((item, index) => {
return (
<RecursionField
basePath={field.address}
key={index}
name={index}
onlyRenderProperties
schema={getSchema(index)}
></RecursionField>
);
})
: null}
</AntdList>
<div className="nb-list-container">
<AntdList
{...props}
pagination={
!meta || meta.count <= meta.pageSize
? false
: {
onChange: onPaginationChange,
total: meta?.count || 0,
pageSize: meta?.pageSize || 10,
current: meta?.page || 1,
}
}
loading={service?.loading}
>
{field.value?.length
? field.value.map((item, index) => {
return (
<RecursionField
basePath={field.address}
key={index}
name={index}
onlyRenderProperties
schema={getSchema(index)}
></RecursionField>
);
})
: null}
</AntdList>
</div>
<Designer />
</SortableItem>
</SchemaComponentOptions>,