UNPKG

amis

Version:

一种MIS页面生成工具

54 lines (53 loc) 1.75 kB
import React from 'react'; import { RendererProps } from '../../factory'; import { FormBaseControl, FormControlSchema } from './Item'; import { SchemaClassName } from '../../Schema'; export declare type GroupSubControl = FormControlSchema & { /** * 列类名 */ columnClassName?: SchemaClassName; /** * 宽度占用比率。在某些容器里面有用比如 group */ columnRatio?: number; }; /** * Group 表单集合渲染器,能让多个表单在一行显示 * 文档:https://baidu.gitee.io/amis/docs/components/form/group */ export interface GroupControlSchema extends FormBaseControl { type: 'group'; /** * FormItem 集合 */ controls: Array<GroupSubControl>; /** * 子表单项默认的展示模式 */ formMode?: 'normal' | 'horizontal' | 'inline'; /** * 间隔 */ gap?: 'xs' | 'sm' | 'normal'; /** * 配置时垂直摆放还是左右摆放。 */ direction?: 'horizontal' | 'vertical'; } export interface InputGroupProps extends RendererProps, Omit<GroupControlSchema, 'type' | 'className'> { } export declare class ControlGroupRenderer extends React.Component<InputGroupProps> { constructor(props: InputGroupProps); renderControl(control: any, index: any, otherProps?: any): JSX.Element | null; renderVertical(props?: Readonly<InputGroupProps> & Readonly<{ children?: React.ReactNode; }>): JSX.Element; renderHorizontal(props?: Readonly<InputGroupProps> & Readonly<{ children?: React.ReactNode; }>): JSX.Element | null; renderInput(props?: Readonly<InputGroupProps> & Readonly<{ children?: React.ReactNode; }>): JSX.Element | null; render(): JSX.Element | null; }