From 1ea478468812342180b559122d6162f2d5b3daf8 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Sat, 21 Jul 2018 14:09:22 +0800 Subject: [PATCH] docs: update form docs --- components/form/index.en-US.md | 6 ++---- components/form/index.zh-CN.md | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/components/form/index.en-US.md b/components/form/index.en-US.md index a2a53ece7..cc9337970 100644 --- a/components/form/index.en-US.md +++ b/components/form/index.en-US.md @@ -119,13 +119,11 @@ After wrapped by `getFieldDecorator`, `value`(or other property defined by `valu | options.initialValue | You can specify initial value, type, optional value of children node. (Note: Because `Form` will test equality with `===` internaly, we recommend to use vairable as `initialValue`, instead of literal) | | n/a | | options.normalize | Normalize value to form component, [a select-all example](https://codesandbox.io/s/kw4l2vqqmv) | function(value, prevValue, allValues): any | - | | options.rules | Includes validation rules. Please refer to "Validation Rules" part for details. | object\[] | n/a | -| options.trigger | When to collect the value of children node | string | 'onChange' | +| options.trigger | When to collect the value of children node | string | 'change' | | options.validateFirst | Whether stop validate on first rule of error for this field. | boolean | false | -| options.validateTrigger | When to validate the value of children node. | string\|string\[] | 'onChange' | +| options.validateTrigger | When to validate the value of children node. | string\|string\[] | 'change' | | options.valuePropName | Props of children node, for example, the prop of Switch is 'checked'. | string | 'value' | -More option can be referenced at [rc-form option](https://github.com/react-component/form#option-object)。 - ### Form.Item Note: diff --git a/components/form/index.zh-CN.md b/components/form/index.zh-CN.md index 5a5ebb78e..1b95db7bc 100644 --- a/components/form/index.zh-CN.md +++ b/components/form/index.zh-CN.md @@ -118,13 +118,11 @@ CustomizedForm = Form.create({})(CustomizedForm); | options.initialValue | 子节点的初始值,类型、可选值均由子节点决定(注意:由于内部校验时使用 `===` 判断是否变化,建议使用变量缓存所需设置的值而非直接使用字面量)) | | | | options.normalize | 转换默认的 value 给控件,[一个选择全部的例子](https://codesandbox.io/s/kw4l2vqqmv) | function(value, prevValue, allValues): any | - | | options.rules | 校验规则,参考下方文档 | object\[] | | -| options.trigger | 收集子节点的值的时机 | string | 'onChange' | +| options.trigger | 收集子节点的值的时机 | string | 'change' | | options.validateFirst | 当某一规则校验不通过时,是否停止剩下的规则的校验 | boolean | false | -| options.validateTrigger | 校验子节点值的时机 | string\|string\[] | 'onChange' | +| options.validateTrigger | 校验子节点值的时机 | string\|string\[] | 'change' | | options.valuePropName | 子节点的值的属性,如 Switch 的是 'checked' | string | 'value' | -更多参数可参考 [rc-form option](https://github.com/react-component/form#option-object)。 - ### Form.Item 注意: