UNPKG

ng-layout-form

Version:

layout form

56 lines (55 loc) 1.41 kB
import { Rule } from 'antd/lib/form'; import { Dispatch } from 'dva'; interface commonItem { } declare type customRule = { test: Function; message: string; }; declare type formItem = { name: string; customRule?: customRule; rules?: Rule[]; [propskey: string]: any; } & commonItem; export declare type form = { name: string; children: Array<formItem>; [propskey: string]: any; }; declare type gridItem = { datafield: string; [propskey: string]: any; } & commonItem; export declare type grid = { name: string; children: Array<gridItem>; }; export interface commonConf { form?: { [propskey: string]: form; }; grid?: { [propskey: string]: grid; }; fieldSetForm?: { [propskey: string]: { name: string; children: Array<{ name: string; [propskey: string]: string | number | boolean; }>; }; }; } export declare type script = (payload: { getState: Function; dispatch: Dispatch; }) => commonConf; export declare type Layout = 'horizontal' | 'vertical' | 'inline'; export declare type LabelPosition = 'top' | 'left'; export interface eventHandler { children?: eventHandler; [propskey: string]: Function | object | eventHandler | undefined | Array<Function>; } export {};