From c5a7f031e41427e98541c80972ac25bb49232af9 Mon Sep 17 00:00:00 2001 From: xrkffgg Date: Mon, 3 Aug 2020 15:01:16 +0800 Subject: [PATCH] docs: format api (#25973) --- components/auto-complete/index.en-US.md | 2 +- components/auto-complete/index.zh-CN.md | 2 +- components/form/index.en-US.md | 4 ++-- components/form/index.zh-CN.md | 18 +++++++++--------- components/input-number/index.zh-CN.md | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/components/auto-complete/index.en-US.md b/components/auto-complete/index.en-US.md index 771d343e86e4..30b913775cbe 100644 --- a/components/auto-complete/index.en-US.md +++ b/components/auto-complete/index.en-US.md @@ -24,7 +24,7 @@ When there is a need for autocomplete functionality. | defaultActiveFirstOption | Whether active first option by default | boolean | true | | | defaultValue | Initial selected option | string | - | | | disabled | Whether disabled select | boolean | false | | -| filterOption | If true, filter options by input, if function, filter options against it. The function will receive two arguments, `inputValue` and `option`, if the function returns `true`, the option will be included in the filtered set; Otherwise, it will be excluded | boolean \| function(inputValue, option) | true | | +| filterOption | If true, filter options by input, if function, filter options against it. The function will receive two arguments, `inputValue` and `option`, if the function returns true, the option will be included in the filtered set; Otherwise, it will be excluded | boolean \| function(inputValue, option) | true | | | placeholder | The placeholder of input | string | - | | | value | Selected option | string | - | | | onBlur | Called when leaving the component | function() | - | | diff --git a/components/auto-complete/index.zh-CN.md b/components/auto-complete/index.zh-CN.md index 603f97683c3d..bd69792b817c 100644 --- a/components/auto-complete/index.zh-CN.md +++ b/components/auto-complete/index.zh-CN.md @@ -25,7 +25,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/qtJm4yt45/AutoComplete.svg | defaultActiveFirstOption | 是否默认高亮第一个选项 | boolean | true | | | defaultValue | 指定默认选中的条目 | string | - | | | disabled | 是否禁用 | boolean | false | | -| filterOption | 是否根据输入项进行筛选。当其为一个函数时,会接收 `inputValue` `option` 两个参数,当 `option` 符合筛选条件时,应返回 `true`,反之则返回 `false` | boolean \| function(inputValue, option) | true | | +| filterOption | 是否根据输入项进行筛选。当其为一个函数时,会接收 `inputValue` `option` 两个参数,当 `option` 符合筛选条件时,应返回 true,反之则返回 false | boolean \| function(inputValue, option) | true | | | getPopupContainer | 菜单渲染父节点。默认渲染到 body 上,如果你遇到菜单滚动定位问题,试试修改为滚动的区域,并相对其定位。[示例](https://codesandbox.io/s/4j168r7jw0) | function(triggerNode) | () => document.body | | | placeholder | 输入框提示 | string | - | | | value | 指定当前选中的条目 | string | - | | diff --git a/components/form/index.en-US.md b/components/form/index.en-US.md index a0aef7acbaa5..0711f11683be 100644 --- a/components/form/index.en-US.md +++ b/components/form/index.en-US.md @@ -184,8 +184,8 @@ Provide linkage between forms. If a sub form with `name` prop update, it will au | Property | Description | Type | Default | | --- | --- | --- | --- | -| onFormChange | Triggered when a sub form field updates | Function(formName: string, info: { changedFields, forms }) | - | -| onFormFinish | Triggered when a sub form submits | Function(formName: string, info: { values, forms }) | - | +| onFormChange | Triggered when a sub form field updates | function(formName: string, info: { changedFields, forms }) | - | +| onFormFinish | Triggered when a sub form submits | function(formName: string, info: { values, forms }) | - | ```jsx any | - | | | getValueProps | 为子元素添加额外的属性 | (value: any) => any | - | 4.2.0 | | hasFeedback | 配合 `validateStatus` 属性使用,展示校验状态图标,建议只配合 Input 组件使用 | boolean | false | | -| help | 提示信息,如不设置,则会根据校验规则自动生成 | string\|ReactNode | - | | +| help | 提示信息,如不设置,则会根据校验规则自动生成 | string \| ReactNode | - | | | htmlFor | 设置子元素 label `htmlFor` 属性 | string | - | | | initialValue | 设置子元素默认值,如果与 Form 的 `initialValues` 冲突则以 Form 为准 | string | - | 4.2.0 | | noStyle | 为 `true` 时不带样式,作为纯字段控件使用 | boolean | false | | -| label | `label` 标签的文本 | string\|ReactNode | - | | +| label | `label` 标签的文本 | string \| ReactNode | - | | | labelAlign | 标签文本对齐方式 | `left` \| `right` | `right` | | | labelCol | `label` 标签布局,同 `` 组件,设置 `span` `offset` 值,如 `{span: 3, offset: 12}` 或 `sm: {span: 3, offset: 12}`。你可以通过 Form 的 `labelCol` 进行统一设置。当和 Form 同时设置时,以 Item 为准 | [object](/components/grid/#Col) | - | | | name | 字段名,支持数组 | [NamePath](#NamePath) | - | | @@ -186,8 +186,8 @@ Form.List 渲染表单相关操作函数。 | 参数 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | -| onFormChange | 子表单字段更新时触发 | Function(formName: string, info: { changedFields, forms }) | - | -| onFormFinish | 子表单提交时触发 | Function(formName: string, info: { values, forms }) | - | +| onFormChange | 子表单字段更新时触发 | function(formName: string, info: { changedFields, forms }) | - | +| onFormFinish | 子表单提交时触发 | function(formName: string, info: { values, forms }) | - | ```jsx