mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 05:29:37 +08:00
chore: 完善Form组件的声明 (#3043)
This commit is contained in:
parent
d8c6eccaea
commit
7a7395329b
@ -19,7 +19,7 @@ export interface FormProps {
|
||||
horizontal?: boolean;
|
||||
inline?: boolean;
|
||||
vertical?: boolean;
|
||||
form?: Object;
|
||||
form?: WrappedFormUtils;
|
||||
onSubmit?: React.FormEventHandler;
|
||||
style?: React.CSSProperties;
|
||||
className?: string;
|
||||
@ -51,19 +51,21 @@ export type WrappedFormUtils = {
|
||||
/** 重置一组输入控件的值与状态,如不传入参数,则重置所有组件 */
|
||||
resetFields(names?: Array<string>): void;
|
||||
|
||||
getFieldProps(id: string, options: {
|
||||
getFieldDecorator(id: string, options: {
|
||||
/** 子节点的值的属性,如 Checkbox 的是 'checked' */
|
||||
valuePropName?: string;
|
||||
/** 子节点的初始值,类型、可选值均由子节点决定 */
|
||||
initialValue?: any;
|
||||
/** 收集子节点的值的时机 */
|
||||
trigger?: string;
|
||||
/** 可以把 onChange 的参数转化为控件的值,例如 DatePicker 可设为:(date, dateString) => dateString */
|
||||
getValueFromEvent?: (...args) => any;
|
||||
/** 校验子节点值的时机 */
|
||||
validateTrigger?: string;
|
||||
/** 校验规则,参见 [async-validator](https://github.com/yiminghe/async-validator) */
|
||||
rules?: Array<any>;
|
||||
/** 必填输入控件唯一标志 */
|
||||
id?: string;
|
||||
/** 是否和其他控件互斥,特别用于 Radio 单选控件 */
|
||||
exclusive: boolean;
|
||||
}): Array<any>;
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ import { FIELD_META_PROP } from './constants';
|
||||
|
||||
export interface FormItemLabelColOption {
|
||||
span: number;
|
||||
offset: number;
|
||||
offset?: number;
|
||||
}
|
||||
|
||||
export interface FormItemProps {
|
||||
|
Loading…
Reference in New Issue
Block a user