fix: scrollbar issue in sub-table with size small under compact theme (#5796)

This commit is contained in:
Katherine 2024-12-05 14:06:01 +08:00 committed by GitHub
parent d31804884f
commit c8d8b719bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 3 deletions

View File

@ -83,7 +83,16 @@ export const FormItem: any = withDynamicSchemaProps(
return (
<CollectionFieldProvider allowNull={true}>
<BlockItem className={'nb-form-item'}>
<BlockItem
className={cx(
'nb-form-item',
css`
.ant-formily-item-layout-horizontal .ant-formily-item-control {
max-width: ${showTitle === false ? '100% !important' : null};
}
`,
)}
>
<ACLCollectionFieldProvider>
<Item className={className} {...props} extra={extra} wrapperStyle={wrapperStyle} />
</ACLCollectionFieldProvider>

View File

@ -588,6 +588,8 @@ const InternalNocoBaseTable = React.memo(
field,
...others
} = props;
const { token } = useToken();
return (
<div
className={cx(
@ -612,10 +614,10 @@ const InternalNocoBaseTable = React.memo(
padding: 16px 8px;
}
.ant-table-middle .ant-table-cell {
padding: 12px 8px;
padding: 12px ${token.paddingXS}px;
}
.ant-table-small .ant-table-cell {
padding: 8px 8px;
padding: 8px ${token.paddingXS}px;
}
}
}