import type { CSSProperties, PropsWithChildren, ReactNode } from 'react'; import type { WatermarkProps as AntdWatermarkProps } from 'antd'; import type { Position, Width } from '../flex'; export type GridDataItem = { /** 显示数据 */ label?: ReactNode; /** 显示数据 */ value?: ReactNode; /** 参见Flex */ width?: Width; /** 参见Flex */ labelWidth?: Width; /** 参见Flex */ valueWidth?: Width; /** 参见Flex */ labelAlignItems?: Position; /** 参见Flex */ valueAlignItems?: Position; /** 参见Flex */ labelJustifyContent?: Position; /** 参见Flex */ valueJustifyContent?: Position; /** 省略提示 */ labelTooltip?: boolean; /** 省略提示 */ valueTooltip?: boolean; /** 是否显示必填 */ required?: boolean; labelStyle?: CSSProperties; valueStyle?: CSSProperties; }; export type GridData = (GridDataItem | null | undefined)[]; export type GridProps = PropsWithChildren<{ className?: string; /** 显示数据 */ data?: GridData; /** 列数 */ span?: number; /** 是否过长省略 */ ellipsis?: boolean; /** 尺寸 */ size?: 'small' | 'middle' | 'large'; /** 参见Flex */ defaultLabelWidth?: Width; /** 参见Flex */ defaultValueWidth?: Width; /** 参见Flex */ defaultLabelAlignItems?: Position; /** 参见Flex */ defaultLabelJustifyContent?: Position; /** 参见Flex */ defaultValueAlignItems?: Position; /** 参见Flex */ defaultValueJustifyContent?: Position; /** 是否有边框 */ bordered?: boolean; /** 单项排列方向 */ itemDirection?: 'vertical' | 'horizontal'; defaultLabelStyle?: CSSProperties; defaultValueStyle?: CSSProperties; /** 水印 */ watermark?: AntdWatermarkProps; }>; /** * @deprecated 特征被样式限制较大,不再维护 */ declare const Component: { (props: GridProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; export default Component;