Browse Source

docs(components): improve link (#23355)

pull/23359/head
kenve 5 years ago
committed by GitHub
parent
commit
edcd1b2609
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      components/card/index.en-US.md
  2. 2
      components/card/index.zh-CN.md
  3. 4
      components/form/index.en-US.md
  4. 4
      components/form/index.zh-CN.md
  5. 4
      components/list/index.en-US.md
  6. 2
      components/list/index.zh-CN.md
  7. 4
      components/page-header/index.en-US.md
  8. 4
      components/page-header/index.zh-CN.md
  9. 2
      components/popconfirm/index.en-US.md
  10. 2
      components/popover/index.en-US.md
  11. 2
      components/table/index.en-US.md
  12. 2
      components/table/index.zh-CN.md

2
components/card/index.en-US.md

@ -37,7 +37,7 @@ A card can be used to display content related to a single subject. The content c
| title | Card title | string\|ReactNode | - | | | title | Card title | string\|ReactNode | - | |
| type | Card style type, can be set to `inner` or not set | string | - | | | type | Card style type, can be set to `inner` or not set | string | - | |
| onTabChange | Callback when tab is switched | (key) => void | - | | | onTabChange | Callback when tab is switched | (key) => void | - | |
| tabProps | [Tabs](https://ant.design/components/tabs/#Tabs) | - | - | | | tabProps | [Tabs](/components/tabs/#Tabs) | - | - | |
### Card.Grid ### Card.Grid

2
components/card/index.zh-CN.md

@ -38,7 +38,7 @@ cols: 1
| title | 卡片标题 | string\|ReactNode | - | | | title | 卡片标题 | string\|ReactNode | - | |
| type | 卡片类型,可设置为 `inner` 或 不设置 | string | - | | | type | 卡片类型,可设置为 `inner` 或 不设置 | string | - | |
| onTabChange | 页签切换的回调 | (key) => void | - | | | onTabChange | 页签切换的回调 | (key) => void | - | |
| tabProps | [Tabs](https://ant.design/components/tabs-cn/#Tabs) | - | - | | | tabProps | [Tabs](/components/tabs/#Tabs) | - | - | |
### Card.Grid ### Card.Grid

4
components/form/index.en-US.md

@ -25,13 +25,13 @@ High performance Form component with data scope management. Including data colle
| hideRequiredMark | Hide required mark for all form items | boolean | false | | hideRequiredMark | Hide required mark for all form items | boolean | false |
| initialValues | Set value by Form initialization or reset | object | - | | initialValues | Set value by Form initialization or reset | object | - |
| labelAlign | text align of label of all items | `left` \| `right` | `right` | | labelAlign | text align of label of all items | `left` \| `right` | `right` |
| labelCol | label layout, like `<Col>` component. Set `span` `offset` value like `{span: 3, offset: 12}` or `sm: {span: 3, offset: 12}` | [object](https://ant.design/components/grid/#Col) | - | | labelCol | label layout, like `<Col>` component. Set `span` `offset` value like `{span: 3, offset: 12}` or `sm: {span: 3, offset: 12}` | [object](/components/grid/#Col) | - |
| layout | Form layout | `horizontal` \| `vertical` \| `inline` | `horizontal` | | layout | Form layout | `horizontal` \| `vertical` \| `inline` | `horizontal` |
| name | Form name. Will be the prefix of Field `id` | string | - | | name | Form name. Will be the prefix of Field `id` | string | - |
| scrollToFirstError | Auto scroll to first failed field when submit | false | - | | scrollToFirstError | Auto scroll to first failed field when submit | false | - |
| size | Set field component size (antd components only) | `small` \| `middle` \| `large` | - | | size | Set field component size (antd components only) | `small` \| `middle` \| `large` | - |
| validateMessages | Validation prompt template, description [see below](#validateMessages) | [ValidateMessages](https://github.com/react-component/field-form/blob/master/src/utils/messages.ts) | - | | validateMessages | Validation prompt template, description [see below](#validateMessages) | [ValidateMessages](https://github.com/react-component/field-form/blob/master/src/utils/messages.ts) | - |
| wrapperCol | The layout for input controls, same as `labelCol` | [object](https://ant.design/components/grid/#Col) | - | | wrapperCol | The layout for input controls, same as `labelCol` | [object](/components/grid/#Col) | - |
| onFinish | Trigger after submitting the form and verifying data successfully | Function(values) | - | | onFinish | Trigger after submitting the form and verifying data successfully | Function(values) | - |
| onFinishFailed | Trigger after submitting the form and verifying data failed | Function({ values, errorFields, outOfDate }) | - | | onFinishFailed | Trigger after submitting the form and verifying data failed | Function({ values, errorFields, outOfDate }) | - |
| onFieldsChange | Trigger when field updated | Function(changedFields, allFields) | - | | onFieldsChange | Trigger when field updated | Function(changedFields, allFields) | - |

4
components/form/index.zh-CN.md

@ -26,13 +26,13 @@ title: Form
| hideRequiredMark | 隐藏所有表单项的必选标记 | boolean | false | | hideRequiredMark | 隐藏所有表单项的必选标记 | boolean | false |
| initialValues | 表单默认值,只有初始化以及重置时生效 | object | - | | initialValues | 表单默认值,只有初始化以及重置时生效 | object | - |
| labelAlign | label 标签的文本对齐方式 | `left` \| `right` | `right` | | labelAlign | label 标签的文本对齐方式 | `left` \| `right` | `right` |
| labelCol | label 标签布局,同 `<Col>` 组件,设置 `span` `offset` 值,如 `{span: 3, offset: 12}``sm: {span: 3, offset: 12}` | [object](https://ant.design/components/grid/#Col) | - | | labelCol | label 标签布局,同 `<Col>` 组件,设置 `span` `offset` 值,如 `{span: 3, offset: 12}``sm: {span: 3, offset: 12}` | [object](/components/grid/#Col) | - |
| layout | 表单布局 | `horizontal` \| `vertical` \| `inline` | `horizontal` | | layout | 表单布局 | `horizontal` \| `vertical` \| `inline` | `horizontal` |
| name | 表单名称,会作为表单字段 `id` 前缀使用 | string | - | | name | 表单名称,会作为表单字段 `id` 前缀使用 | string | - |
| scrollToFirstError | 提交失败自动滚动到第一个错误字段 | false | - | | scrollToFirstError | 提交失败自动滚动到第一个错误字段 | false | - |
| size | 设置字段组件的尺寸(仅限 antd 组件) | `small` \| `middle` \| `large` | - | | size | 设置字段组件的尺寸(仅限 antd 组件) | `small` \| `middle` \| `large` | - |
| validateMessages | 验证提示模板,说明[见下](#validateMessages) | [ValidateMessages](https://github.com/react-component/field-form/blob/master/src/utils/messages.ts) | - | | validateMessages | 验证提示模板,说明[见下](#validateMessages) | [ValidateMessages](https://github.com/react-component/field-form/blob/master/src/utils/messages.ts) | - |
| wrapperCol | 需要为输入控件设置布局样式时,使用该属性,用法同 labelCol | [object](https://ant.design/components/grid/#Col) | - | | wrapperCol | 需要为输入控件设置布局样式时,使用该属性,用法同 labelCol | [object](/components/grid/#Col) | - |
| onFinish | 提交表单且数据验证成功后回调事件 | Function(values) | - | | onFinish | 提交表单且数据验证成功后回调事件 | Function(values) | - |
| onFinishFailed | 提交表单且数据验证失败后回调事件 | Function({ values, errorFields, outOfDate }) | - | | onFinishFailed | 提交表单且数据验证失败后回调事件 | Function({ values, errorFields, outOfDate }) | - |
| onFieldsChange | 字段更新时触发回调事件 | Function(changedFields, allFields) | - | | onFieldsChange | 字段更新时触发回调事件 | Function(changedFields, allFields) | - |

4
components/list/index.en-US.md

@ -23,10 +23,10 @@ A list can be used to display content related to a single subject. The content c
| header | List header renderer | string\|ReactNode | - | | | header | List header renderer | string\|ReactNode | - | |
| itemLayout | The layout of list, default is `horizontal`, If a vertical list is desired, set the itemLayout property to `vertical` | string | - | | | itemLayout | The layout of list, default is `horizontal`, If a vertical list is desired, set the itemLayout property to `vertical` | string | - | |
| rowKey | Item's unique key, could be a string or function that returns a string | string\|Function(record):string | `key` | | | rowKey | Item's unique key, could be a string or function that returns a string | string\|Function(record):string | `key` | |
| loading | Shows a loading indicator while the contents of the list are being fetched | boolean\|[SpinProps](https://ant.design/components/spin/#API) ([more](https://github.com/ant-design/ant-design/issues/8659)) | false | | | loading | Shows a loading indicator while the contents of the list are being fetched | boolean\|[SpinProps](/components/spin/#API) ([more](https://github.com/ant-design/ant-design/issues/8659)) | false | |
| loadMore | Shows a load more content | string\|ReactNode | - | | | loadMore | Shows a load more content | string\|ReactNode | - | |
| locale | i18n text including empty text | object | emptyText: 'No Data' <br> | | | locale | i18n text including empty text | object | emptyText: 'No Data' <br> | |
| pagination | Pagination [config](https://ant.design/components/pagination/), hide it by setting it to false | boolean \| object | false | | | pagination | Pagination [config](/components/pagination/), hide it by setting it to false | boolean \| object | false | |
| size | Size of list | `default` \| `large` \| `small` | `default` | | | size | Size of list | `default` \| `large` \| `small` | `default` | |
| split | Toggles rendering of the split under the list item | boolean | true | | | split | Toggles rendering of the split under the list item | boolean | true | |
| dataSource | dataSource array for list | any[] | - | | | dataSource | dataSource array for list | any[] | - | |

2
components/list/index.zh-CN.md

@ -23,7 +23,7 @@ cols: 1
| grid | 列表栅格配置 | [object](#List-grid-props) | - | | | grid | 列表栅格配置 | [object](#List-grid-props) | - | |
| header | 列表头部 | string\|ReactNode | - | | | header | 列表头部 | string\|ReactNode | - | |
| itemLayout | 设置 `List.Item` 布局, 设置成 `vertical` 则竖直样式显示, 默认横排 | string | - | | | itemLayout | 设置 `List.Item` 布局, 设置成 `vertical` 则竖直样式显示, 默认横排 | string | - | |
| loading | 当卡片内容还在加载中时,可以用 `loading` 展示一个占位 | boolean\|[object](https://ant.design/components/spin-cn/#API) ([更多](https://github.com/ant-design/ant-design/issues/8659)) | false | | | loading | 当卡片内容还在加载中时,可以用 `loading` 展示一个占位 | boolean\|[object](/components/spin/#API) ([更多](https://github.com/ant-design/ant-design/issues/8659)) | false | |
| loadMore | 加载更多 | string\|ReactNode | - | | | loadMore | 加载更多 | string\|ReactNode | - | |
| locale | 默认文案设置,目前包括空数据文案 | object | emptyText: '暂无数据' | | | locale | 默认文案设置,目前包括空数据文案 | object | emptyText: '暂无数据' | |
| pagination | 对应的 `pagination` 配置, 设置 `false` 不显示 | boolean\|object | false | | | pagination | 对应的 `pagination` 配置, 设置 `false` 不显示 | boolean\|object | false | |

4
components/page-header/index.en-US.md

@ -21,9 +21,9 @@ PageHeader can be used to highlight the page topic, display important informatio
| ghost | PageHeader type, will change background color | boolean | true | | | ghost | PageHeader type, will change background color | boolean | true | |
| avatar | Avatar next to the title bar | [avatar props](/components/avatar/) | - | | | avatar | Avatar next to the title bar | [avatar props](/components/avatar/) | - | |
| backIcon | Custom back icon, if false the back icon will not be displayed | ReactNode \| boolean | `<ArrowLeft />` | | | backIcon | Custom back icon, if false the back icon will not be displayed | ReactNode \| boolean | `<ArrowLeft />` | |
| tags | Tag list next to title | [Tag](https://ant.design/components/tag-cn/)[] \| [Tag](https://ant.design/components/tag-cn/) | - | | | tags | Tag list next to title | [Tag](/components/tag/)[] \| [Tag](/components/tag/) | - | |
| extra | Operating area, at the end of the line of the title line | ReactNode | - | | | extra | Operating area, at the end of the line of the title line | ReactNode | - | |
| breadcrumb | Breadcrumb configuration | [breadcrumb](https://ant.design/components/breadcrumb-cn/) | - | | | breadcrumb | Breadcrumb configuration | [breadcrumb](/components/breadcrumb/) | - | |
| footer | PageHeader's footer, generally used to render TabBar | ReactNode | - | | | footer | PageHeader's footer, generally used to render TabBar | ReactNode | - | |
| onBack | Back icon click event | `()=>void` | `()=>history.back()` | | | onBack | Back icon click event | `()=>void` | `()=>history.back()` | |

4
components/page-header/index.zh-CN.md

@ -21,9 +21,9 @@ subtitle: 页头
| ghost | pageHeader 的类型,将会改变背景颜色 | boolean | true | | | ghost | pageHeader 的类型,将会改变背景颜色 | boolean | true | |
| avatar | 标题栏旁的头像 | [avatar props](/components/avatar/) | - | | | avatar | 标题栏旁的头像 | [avatar props](/components/avatar/) | - | |
| backIcon | 自定义 back icon ,如果为 false 不渲染 back icon | ReactNode \| boolean | `<ArrowLeft />` | | | backIcon | 自定义 back icon ,如果为 false 不渲染 back icon | ReactNode \| boolean | `<ArrowLeft />` | |
| tags | title 旁的 tag 列表 | [Tag](https://ant.design/components/tag-cn/)[] \| [Tag](https://ant.design/components/tag-cn/) | - | | | tags | title 旁的 tag 列表 | [Tag](/components/tag/)[] \| [Tag](/components/tag/) | - | |
| extra | 操作区,位于 title 行的行尾 | ReactNode | - | | | extra | 操作区,位于 title 行的行尾 | ReactNode | - | |
| breadcrumb | 面包屑的配置 | [breadcrumb](https://ant.design/components/breadcrumb-cn/) | - | | | breadcrumb | 面包屑的配置 | [breadcrumb](/components/breadcrumb/) | - | |
| footer | PageHeader 的页脚,一般用于渲染 TabBar | ReactNode | - | | | footer | PageHeader 的页脚,一般用于渲染 TabBar | ReactNode | - | |
| onBack | 返回按钮的点击事件 | `()=>void` | `()=>history.back()` | | | onBack | 返回按钮的点击事件 | `()=>void` | `()=>history.back()` | |

2
components/popconfirm/index.en-US.md

@ -25,7 +25,7 @@ The difference with the `confirm` modal dialog is that it's more lightweight tha
| icon | customize icon of confirmation | ReactNode | `<ExclamationCircle />` | | icon | customize icon of confirmation | ReactNode | `<ExclamationCircle />` |
| disabled | is show popconfirm when click its childrenNode | boolean | false | | disabled | is show popconfirm when click its childrenNode | boolean | false |
Consult [Tooltip's documentation](https://ant.design/components/tooltip/#API) to find more APIs. Consult [Tooltip's documentation](/components/tooltip/#API) to find more APIs.
## Note ## Note

2
components/popover/index.en-US.md

@ -19,7 +19,7 @@ Comparing with `Tooltip`, besides information `Popover` card can also provide ac
| content | Content of the card | string\|ReactNode\|() => ReactNode | - | | | content | Content of the card | string\|ReactNode\|() => ReactNode | - | |
| title | Title of the card | string\|ReactNode\|() => ReactNode | - | | | title | Title of the card | string\|ReactNode\|() => ReactNode | - | |
Consult [Tooltip's documentation](https://ant.design/components/tooltip/#API) to find more APIs. Consult [Tooltip's documentation](/components/tooltip/#API) to find more APIs.
## Note ## Note

2
components/table/index.en-US.md

@ -66,7 +66,7 @@ const columns = [
| dataSource | Data record array to be displayed | any\[] | - | | dataSource | Data record array to be displayed | any\[] | - |
| expandable | Config expandable content | [expandable](#expandable) | - | | expandable | Config expandable content | [expandable](#expandable) | - |
| footer | Table footer renderer | Function(currentPageData) | - | | footer | Table footer renderer | Function(currentPageData) | - |
| loading | Loading status of table | boolean\|[object](https://ant.design/components/spin-cn/#API) ([more](https://github.com/ant-design/ant-design/issues/4544#issuecomment-271533135)) | `false` | | loading | Loading status of table | boolean\|[object](/components/spin/#API) ([more](https://github.com/ant-design/ant-design/issues/4544#issuecomment-271533135)) | `false` |
| locale | i18n text including filter, sort, empty text, etc | object | filterConfirm: 'Ok' <br> filterReset: 'Reset' <br> emptyText: 'No Data' <br> [Default](https://github.com/ant-design/ant-design/issues/575#issuecomment-159169511) | | locale | i18n text including filter, sort, empty text, etc | object | filterConfirm: 'Ok' <br> filterReset: 'Reset' <br> emptyText: 'No Data' <br> [Default](https://github.com/ant-design/ant-design/issues/575#issuecomment-159169511) |
| pagination | Config of pagination. You can ref table pagination [config](#pagination) or full [`pagination`](/components/pagination/) document, hide it by setting it to `false` | object | - | | pagination | Config of pagination. You can ref table pagination [config](#pagination) or full [`pagination`](/components/pagination/) document, hide it by setting it to `false` | object | - |
| rowClassName | Row's className | Function(record, index):string | - | | rowClassName | Row's className | Function(record, index):string | - |

2
components/table/index.zh-CN.md

@ -71,7 +71,7 @@ const columns = [
| dataSource | 数据数组 | any\[] | - | | dataSource | 数据数组 | any\[] | - |
| expandable | 配置展开属性 | [expandable](#expandable) | - | | expandable | 配置展开属性 | [expandable](#expandable) | - |
| footer | 表格尾部 | Function(currentPageData) | - | | footer | 表格尾部 | Function(currentPageData) | - |
| loading | 页面是否加载中 | boolean\|[object](https://ant.design/components/spin-cn/#API) ([更多](https://github.com/ant-design/ant-design/issues/4544#issuecomment-271533135)) | false | | loading | 页面是否加载中 | boolean\|[object](/components/spin/#API) ([更多](https://github.com/ant-design/ant-design/issues/4544#issuecomment-271533135)) | false |
| locale | 默认文案设置,目前包括排序、过滤、空数据文案 | object | filterConfirm: '确定' <br> filterReset: '重置' <br> emptyText: '暂无数据' <br> [默认值](https://github.com/ant-design/ant-design/issues/575#issuecomment-159169511) | | locale | 默认文案设置,目前包括排序、过滤、空数据文案 | object | filterConfirm: '确定' <br> filterReset: '重置' <br> emptyText: '暂无数据' <br> [默认值](https://github.com/ant-design/ant-design/issues/575#issuecomment-159169511) |
| pagination | 分页器,参考[配置项](#pagination)或 [pagination](/components/pagination/) 文档,设为 false 时不展示和进行分页 | object | - | | pagination | 分页器,参考[配置项](#pagination)或 [pagination](/components/pagination/) 文档,设为 false 时不展示和进行分页 | object | - |
| rowClassName | 表格行的类名 | Function(record, index):string | - | | rowClassName | 表格行的类名 | Function(record, index):string | - |

Loading…
Cancel
Save