fix: style issues for gridCard in mobile client (#4593)

* fix: style issiues for gridCard in mobile client

* fix: bug

* fix: bug

* fix: bug
This commit is contained in:
Katherine 2024-06-07 20:39:22 +08:00 committed by GitHub
parent 7d4ae69f08
commit b00631ab89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,6 +21,7 @@ import { GridCardDesigner } from './GridCard.Designer';
import { GridCardItem } from './GridCard.Item'; import { GridCardItem } from './GridCard.Item';
import { useGridCardActionBarProps, useGridCardBodyHeight } from './hooks'; import { useGridCardActionBarProps, useGridCardBodyHeight } from './hooks';
import { defaultColumnCount, pageSizeOptions } from './options'; import { defaultColumnCount, pageSizeOptions } from './options';
import { useBlockHeightProps } from '../../../block-provider';
const rowGutter = { const rowGutter = {
md: 12, md: 12,
@ -89,7 +90,8 @@ const InternalGridCard = (props: GridCardProps) => {
const field = useField<ArrayField>(); const field = useField<ArrayField>();
const Designer = useDesigner(); const Designer = useDesigner();
const height = useGridCardBodyHeight(); const height = useGridCardBodyHeight();
console.log(fieldSchema); const { heightProps } = useBlockHeightProps() || {};
const { heightMode } = heightProps || {};
const [schemaMap] = useState(new Map()); const [schemaMap] = useState(new Map());
const getSchema = useCallback( const getSchema = useCallback(
(key) => { (key) => {
@ -136,7 +138,7 @@ const InternalGridCard = (props: GridCardProps) => {
css` css`
.ant-spin-nested-loading { .ant-spin-nested-loading {
height: ${height ? height + `px` : '100%'}; height: ${height ? height + `px` : '100%'};
overflow-y: auto; overflow-y: ${!heightMode || heightMode === 'defaultHeight' ? 'null' : 'auto'};
overflow-x: clip; overflow-x: clip;
} }
`, `,