From 4388a96c32b769bf0d213ef5963aad2a94ed568a Mon Sep 17 00:00:00 2001 From: xrkffgg Date: Fri, 17 Jan 2020 17:23:48 +0800 Subject: [PATCH] docs: Format string notation of all components (#20970) --- components/avatar/index.en-US.md | 2 +- components/avatar/index.zh-CN.md | 4 ++-- components/badge/index.zh-CN.md | 2 +- components/collapse/index.en-US.md | 2 +- components/collapse/index.zh-CN.md | 2 +- components/config-provider/index.en-US.md | 4 ++-- components/config-provider/index.zh-CN.md | 4 ++-- components/date-picker/index.en-US.md | 4 ++-- components/date-picker/index.zh-CN.md | 4 ++-- components/descriptions/index.en-US.md | 4 ++-- components/descriptions/index.zh-CN.md | 4 ++-- components/divider/index.en-US.md | 4 ++-- components/divider/index.zh-CN.md | 4 ++-- components/drawer/index.en-US.md | 2 +- components/drawer/index.zh-CN.md | 2 +- components/form/index.en-US.md | 8 ++++---- components/form/index.zh-CN.md | 8 ++++---- components/grid/index.en-US.md | 4 ++-- components/grid/index.zh-CN.md | 4 ++-- components/layout/index.en-US.md | 4 ++-- components/layout/index.zh-CN.md | 4 ++-- components/list/index.en-US.md | 2 +- components/list/index.zh-CN.md | 2 +- components/mentions/index.en-US.md | 2 +- components/mentions/index.zh-CN.md | 2 +- components/menu/index.en-US.md | 4 ++-- components/menu/index.zh-CN.md | 4 ++-- components/modal/index.en-US.md | 2 +- components/modal/index.zh-CN.md | 2 +- components/progress/index.en-US.md | 2 +- components/progress/index.zh-CN.md | 4 ++-- components/result/index.en-US.md | 2 +- components/result/index.zh-CN.md | 2 +- components/skeleton/index.en-US.md | 22 +++++++++++----------- components/skeleton/index.zh-CN.md | 22 +++++++++++----------- components/table/index.en-US.md | 8 ++++---- components/table/index.zh-CN.md | 10 +++++----- components/transfer/index.en-US.md | 2 +- components/transfer/index.zh-CN.md | 2 +- components/typography/index.en-US.md | 6 +++--- components/typography/index.zh-CN.md | 6 +++--- 41 files changed, 94 insertions(+), 94 deletions(-) diff --git a/components/avatar/index.en-US.md b/components/avatar/index.en-US.md index f20ecc666b..b0b6dc8be8 100644 --- a/components/avatar/index.en-US.md +++ b/components/avatar/index.en-US.md @@ -12,7 +12,7 @@ Avatars can be used to represent people or objects. It supports images, `Icon`s, | --- | --- | --- | --- | --- | | icon | custom icon type for an icon avatar | ReactNode | - | | | shape | the shape of avatar | `circle` \| `square` | `circle` | | -| size | the size of the avatar | number \| string: `large` `small` `default` | `default` | | +| size | the size of the avatar | number \| `large` \| `small` \| `default` | `default` | | | src | the address of the image for an image avatar | string | - | | | srcSet | a list of sources to use for different screen resolutions | string | - | | | alt | This attribute defines the alternative text describing the image | string | - | | diff --git a/components/avatar/index.zh-CN.md b/components/avatar/index.zh-CN.md index fd2ad2c1ea..6bce526549 100644 --- a/components/avatar/index.zh-CN.md +++ b/components/avatar/index.zh-CN.md @@ -16,8 +16,8 @@ title: Avatar | 参数 | 说明 | 类型 | 默认值 | 版本 | | --- | --- | --- | --- | --- | | icon | 设置头像的自定义图标 | ReactNode | - | | -| shape | 指定头像的形状 | Enum{ 'circle', 'square' } | `circle` | | -| size | 设置头像的大小 | number \| Enum{ 'large', 'small', 'default' } | `default` | | +| shape | 指定头像的形状 | `circle` \| `square` | `circle` | | +| size | 设置头像的大小 | number \| `large` \| `small` \| `default` | `default` | | | src | 图片类头像的资源地址 | string | - | | | srcSet | 设置图片类头像响应式资源地址 | string | - | | | alt | 图像无法显示时的替代文本 | string | - | | diff --git a/components/badge/index.zh-CN.md b/components/badge/index.zh-CN.md index 61a5b4d27b..c4d2a22368 100644 --- a/components/badge/index.zh-CN.md +++ b/components/badge/index.zh-CN.md @@ -31,6 +31,6 @@ title: Badge | offset | 设置状态点的位置偏移,格式为 `[x, y]` | `[number, number]` | - | | | overflowCount | 展示封顶的数字值 | number | 99 | | | showZero | 当数值为 0 时,是否展示 Badge | boolean | false | | -| status | 设置 Badge 为状态点 | Enum{ 'success', 'processing, 'default', 'error', 'warning' } | '' | | +| status | 设置 Badge 为状态点 | `success` \| `processing` \| `default` \| `error` \| `warning` | '' | | | text | 在设置了 `status` 的前提下有效,设置状态点的文本 | string | '' | | | title | 设置鼠标放在状态点上时显示的文字 | string | `count` | | diff --git a/components/collapse/index.en-US.md b/components/collapse/index.en-US.md index 426995e4ab..599b04f527 100644 --- a/components/collapse/index.en-US.md +++ b/components/collapse/index.en-US.md @@ -24,7 +24,7 @@ A content area which can be collapsed and expanded. | accordion | If `true`, `Collapse` renders as `Accordion` | boolean | `false` | | | onChange | Callback function executed when active panel is changed | Function | - | | | expandIcon | allow to customize collapse icon | (panelProps) => ReactNode | - | | -| expandIconPosition | Set expand icon position: `left`, `right` | `left` | - | | +| expandIconPosition | Set expand icon position | `left` \| `right` | - | | | destroyInactivePanel | Destroy Inactive Panel | boolean | `false` | | ### Collapse.Panel diff --git a/components/collapse/index.zh-CN.md b/components/collapse/index.zh-CN.md index e2237a4ba9..7f3a5a8cb8 100644 --- a/components/collapse/index.zh-CN.md +++ b/components/collapse/index.zh-CN.md @@ -25,7 +25,7 @@ cols: 1 | accordion | 手风琴模式 | boolean | `false` | | | onChange | 切换面板的回调 | Function | 无 | | | expandIcon | 自定义切换图标 | (panelProps) => ReactNode | - | | -| expandIconPosition | 设置图标位置: `left`, `right` | `left` | - | | +| expandIconPosition | 设置图标位置 | `left` \| `right` | - | | | destroyInactivePanel | 销毁折叠隐藏的面板 | boolean | `false` | | ### Collapse.Panel diff --git a/components/config-provider/index.en-US.md b/components/config-provider/index.en-US.md index ce03824c12..c29aaff247 100644 --- a/components/config-provider/index.en-US.md +++ b/components/config-provider/index.en-US.md @@ -38,7 +38,7 @@ Some components use dynamic style to support wave effect. You can config `csp` p | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | | autoInsertSpaceInButton | Set `false` to remove space between 2 chinese characters on Button | boolean | true | | -| componentSize | Config antd component size | `small | middle | large` | - | | +| componentSize | Config antd component size | `small` \| `middle` \| `large` | - | | | csp | Set [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) config | { nonce: string } | - | | | form | Set Form common props | { validateMessages?: [ValidateMessages](/components/form/#validateMessages) } | - | | | renderEmpty | set empty content of components. Ref [Empty](/components/empty/) | Function(componentName: string): ReactNode | - | | @@ -46,7 +46,7 @@ Some components use dynamic style to support wave effect. You can config `csp` p | locale | language package setting, you can find the packages in [antd/es/locale](http://unpkg.com/antd/es/locale/) | object | | | prefixCls | set prefix class | string | ant | | | pageHeader | Unify the ghost of pageHeader ,Ref [pageHeader](<(/components/page-header)> | { ghost:boolean } | 'true' | | -| direction | set direction of layout. See [demo](#components-config-provider-demo-direction) | string: 'ltr', 'rtl' | ltr | | +| direction | set direction of layout. See [demo](#components-config-provider-demo-direction) | `ltr` \| `rtl` | `ltr` | | ## FAQ diff --git a/components/config-provider/index.zh-CN.md b/components/config-provider/index.zh-CN.md index fef9984391..28a4d37e2e 100644 --- a/components/config-provider/index.zh-CN.md +++ b/components/config-provider/index.zh-CN.md @@ -39,7 +39,7 @@ return ( | 参数 | 说明 | 类型 | 默认值 | 版本 | | --- | --- | --- | --- | --- | | autoInsertSpaceInButton | 设置为 `false` 时,移除按钮中 2 个汉字之间的空格 | boolean | true | | -| componentSize | 设置 antd 组件大小 | `small | middle | large` | - | | +| componentSize | 设置 antd 组件大小 | `small` \| `middle` \| `large` | - | | | csp | 设置 [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) 配置 | { nonce: string } | - | | | form | 设置 Form 组件的通用属性 | { validateMessages?: [ValidateMessages](/components/form/#validateMessages) } | - | | | renderEmpty | 自定义组件空状态。参考 [空状态](/components/empty/) | Function(componentName: string): ReactNode | - | | @@ -47,7 +47,7 @@ return ( | locale | 语言包配置,语言包可到 [antd/es/locale](http://unpkg.com/antd/es/locale/) 目录下寻找 | object | - | | | prefixCls | 设置统一样式前缀 | string | ant | | | pageHeader | 统一设置 pageHeader 的 ghost,参考 [pageHeader](<(/components/page-header)>) | { ghost: boolean } | 'true' | | -| direction | 设置文本展示方向。 [示例](#components-config-provider-demo-direction) | string: 'ltr', 'rtl' | ltr | | +| direction | 设置文本展示方向。 [示例](#components-config-provider-demo-direction) | `ltr` \| `rtl` | `ltr` | | ## FAQ diff --git a/components/date-picker/index.en-US.md b/components/date-picker/index.en-US.md index 314f0b3e73..277e132a99 100644 --- a/components/date-picker/index.en-US.md +++ b/components/date-picker/index.en-US.md @@ -54,9 +54,9 @@ The following APIs are shared by DatePicker, YearPicker, MonthPicker, RangePicke | dropdownClassName | to customize the className of the popup calendar | string | - | | | getPopupContainer | to set the container of the floating layer, while the default is to create a `div` element in `body` | function(trigger) | - | | | locale | localization configuration | object | [default](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json) | | -| mode | picker panel mode([Cannot select year or month anymore?](/docs/react/faq#When-set-mode-to-DatePicker/RangePicker,-cannot-select-year-or-month-anymore?) | `time|date|month|year|decade` | - | | +| mode | picker panel mode([Cannot select year or month anymore?](/docs/react/faq#When-set-mode-to-DatePicker/RangePicker,-cannot-select-year-or-month-anymore?) | `time` \| `date` \| `month` \| `year` \| `decade` | - | | | open | open state of picker | boolean | - | | -| picker | Set picker type | `date`, `week`, `month`, `year` | `date` | | +| picker | Set picker type | `date` \| `week` \| `month` \| `year` | `date` | | | placeholder | placeholder of date input | string\|RangePicker\[] | - | | | popupStyle | to customize the style of the popup calendar | object | {} | | | size | determine the size of the input box, the height of `large` and `small`, are 40px and 24px respectively, while default size is 32px | string | - | | diff --git a/components/date-picker/index.zh-CN.md b/components/date-picker/index.zh-CN.md index 3a1cd41767..2a72f8cda0 100644 --- a/components/date-picker/index.zh-CN.md +++ b/components/date-picker/index.zh-CN.md @@ -56,9 +56,9 @@ import 'moment/locale/zh-cn'; | dropdownClassName | 额外的弹出日历 className | string | - | | | getPopupContainer | 定义浮层的容器,默认为 body 上新建 div | function(trigger) | 无 | | | locale | 国际化配置 | object | [默认配置](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json) | | -| mode | 日期面板的状态([设置后无法选择年份/月份?](/docs/react/faq#当我指定了-DatePicker/RangePicker-的-mode-属性后,点击后无法选择年份/月份?)) | `time|date|month|year|decade` | - | | +| mode | 日期面板的状态([设置后无法选择年份/月份?](/docs/react/faq#当我指定了-DatePicker/RangePicker-的-mode-属性后,点击后无法选择年份/月份?)) | `time` \| `date` \| `month` \| `year` \| `decade` | - | | | open | 控制弹层是否展开 | boolean | - | | -| picker | 设置选择器类型 | `date`, `week`, `month`, `year` | `date` | | +| picker | 设置选择器类型 | `date` \| `week` \| `month` \| `year` | `date` | | | placeholder | 输入框提示文字 | string\|RangePicker\[] | - | | | popupStyle | 额外的弹出日历样式 | object | {} | | | size | 输入框大小,`large` 高度为 40px,`small` 为 24px,默认是 32px | string | 无 | | diff --git a/components/descriptions/index.en-US.md b/components/descriptions/index.en-US.md index 1da8de8a0c..a15753ac02 100644 --- a/components/descriptions/index.en-US.md +++ b/components/descriptions/index.en-US.md @@ -20,8 +20,8 @@ Commonly displayed on the details page. | title | The title of the description list, placed at the top | ReactNode | - | | | bordered | whether to display the border | boolean | false | | | column | the number of `DescriptionItems` in a row,could be a number or a object like `{ xs: 8, sm: 16, md: 24}`,(Only set `bordered={true}` to take effect) | number | 3 | | -| size | set the size of the list. Can be set to `middle`,`small`, or not filled | `default | middle | small` | false | | -| layout | Define description layout | `horizontal | vertical` | `horizontal` | | +| size | set the size of the list. Can be set to `middle`,`small`, or not filled | `default` \| `middle` \| `small` | false | | +| layout | Define description layout | `horizontal` \| `vertical` | `horizontal` | | | colon | change default props `colon` value of `Descriptions.Item` | boolean | true | | ### DescriptionItem diff --git a/components/descriptions/index.zh-CN.md b/components/descriptions/index.zh-CN.md index 3e38f9e558..a7c4608ef1 100644 --- a/components/descriptions/index.zh-CN.md +++ b/components/descriptions/index.zh-CN.md @@ -21,8 +21,8 @@ cols: 1 | title | 描述列表的标题,显示在最顶部 | ReactNode | - | | | bordered | 是否展示边框 | boolean | false | | | column | 一行的 `DescriptionItems` 数量,可以写成像素值或支持响应式的对象写法 `{ xs: 8, sm: 16, md: 24}` | number | 3 | | -| size | 设置列表的大小。可以设置为 `middle` 、`small`, 或不填(只有设置 `bordered={true}` 生效) | `default | middle | small` | false | | -| layout | 描述布局 | `horizontal | vertical` | `horizontal` | | +| size | 设置列表的大小。可以设置为 `middle` 、`small`, 或不填(只有设置 `bordered={true}` 生效) | `default` \| `middle` \| `small` | false | | +| layout | 描述布局 | `horizontal` \| `vertical` | `horizontal` | | | colon | 配置 `Descriptions.Item` 的 `colon` 的默认值 | boolean | true | | ### DescriptionItem diff --git a/components/divider/index.en-US.md b/components/divider/index.en-US.md index ecd383c624..5b774be66d 100644 --- a/components/divider/index.en-US.md +++ b/components/divider/index.en-US.md @@ -20,6 +20,6 @@ A divider line separates different content. | --- | --- | --- | --- | --- | | className | className of container | string | - | | | dashed | whether line is dashed | boolean | false | | -| orientation | position of title inside divider | enum: `left` `right` `center` | `center` | | +| orientation | position of title inside divider | `left` \| `right` \| `center` | `center` | | | style | style object of container | object | - | | -| type | direction type of divider | enum: `horizontal` `vertical` | `horizontal` | | +| type | direction type of divider | `horizontal` \| `vertical` | `horizontal` | | diff --git a/components/divider/index.zh-CN.md b/components/divider/index.zh-CN.md index 8da18d179b..2a450cd3f3 100644 --- a/components/divider/index.zh-CN.md +++ b/components/divider/index.zh-CN.md @@ -18,6 +18,6 @@ subtitle: 分割线 | ----------- | ---------------- | ----------------------------- | ------------ | ---- | | className | 分割线样式类 | string | - | | | dashed | 是否虚线 | boolean | false | | -| orientation | 分割线标题的位置 | enum: `left` `right` | `center` | | +| orientation | 分割线标题的位置 | `left` \| `right` \| `center` | `center` | | | style | 分割线样式对象 | object | - | | -| type | 水平还是垂直类型 | enum: `horizontal` `vertical` | `horizontal` | | +| type | 水平还是垂直类型 | `horizontal` \| `vertical` | `horizontal` | | diff --git a/components/drawer/index.en-US.md b/components/drawer/index.en-US.md index c9f31f73e9..3e56a0b64d 100644 --- a/components/drawer/index.en-US.md +++ b/components/drawer/index.en-US.md @@ -35,7 +35,7 @@ A Drawer is a panel that is typically overlaid on top of a page and slides in fr | height | placement is `top` or `bottom`, height of the Drawer dialog. | string\|number | 256 | | className | The class name of the container of the Drawer dialog. | string | - | | zIndex | The `z-index` of the Drawer. | Number | 1000 | -| placement | The placement of the Drawer. | 'top' \| 'right' \| 'bottom' \| 'left' | 'right' | +| placement | The placement of the Drawer. | `top` \| `right` \| `bottom` \| `left` | `right` | | onClose | Specify a callback that will be called when a user clicks mask, close button or Cancel button. | function(e) | - | | afterVisibleChange | Callback after the animation ends when switching drawers. | function(visible) | - | | keyboard | Whether support press esc to close | Boolean | true | diff --git a/components/drawer/index.zh-CN.md b/components/drawer/index.zh-CN.md index 9a2cb3ac8d..522f5d59bc 100644 --- a/components/drawer/index.zh-CN.md +++ b/components/drawer/index.zh-CN.md @@ -34,7 +34,7 @@ title: Drawer | height | 高度, 在 `placement` 为 `top` 或 `bottom` 时使用 | string \| number | 256 | | className | 对话框外层容器的类名 | string | - | | zIndex | 设置 Drawer 的 `z-index` | number | 1000 | -| placement | 抽屉的方向 | 'top' \| 'right' \| 'bottom' \| 'left' | 'right' | +| placement | 抽屉的方向 | `top` \| `right` \| `bottom` \| `left` | `right` | | onClose | 点击遮罩层或右上角叉或取消按钮的回调 | function(e) | - | | afterVisibleChange | 切换抽屉时动画结束后的回调 | function(visible) | - | | keyboard | 是否支持键盘 esc 关闭 | boolean | true | diff --git a/components/form/index.en-US.md b/components/form/index.en-US.md index 6d97ae4ce6..b7f03e321b 100644 --- a/components/form/index.en-US.md +++ b/components/form/index.en-US.md @@ -24,11 +24,11 @@ High performance Form component with data scope management. Including data colle | form | Form control instance created by `Form.useForm()`. Automatically created when not provided | [FormInstance](#FormInstance) | - | | hideRequiredMark | Hide required mark for all form items | boolean | false | | 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 `` component. Set `span` `offset` value like `{span: 3, offset: 12}` or `sm: {span: 3, offset: 12}` | [object](https://ant.design/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 | - | -| size | Set field component size (antd components only) | `small | middle | large` | - | +| size | Set field component size (antd components only) | `small` \| `middle` \| `large` | - | | validateMessages | 验证提示模板,说明[见下](#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) | - | | onFinish | Trigger after submitting the form and verifying data successfully | Function(values) | - | @@ -77,7 +77,7 @@ Form field component for data bidirectional binding, validation, layout, and so | htmlFor | Set sub label `htmlFor` | string | - | | noStyle | No style for `true`, used as a pure field control | boolean | false | | label | Label text | string\|ReactNode | - | -| labelAlign | text align of label | 'left' \| 'right' | 'right' | +| labelAlign | text align of label | `left` \| `right` | `right` | | labelCol | The layout of label. You can set `span` `offset` to something like `{span: 3, offset: 12}` or `sm: {span: 3, offset: 12}` same as with ``. You can set `labelCol` on Form. If both exists, use Item first | [object](/components/grid/#Col) | - | | name | Field name, support array | [NamePath](#NamePath) | - | | normalize | Normalize value to form component | (value, prevValue, prevValues) => any | - | diff --git a/components/form/index.zh-CN.md b/components/form/index.zh-CN.md index 378fea19f2..c2a8135b42 100644 --- a/components/form/index.zh-CN.md +++ b/components/form/index.zh-CN.md @@ -25,11 +25,11 @@ title: Form | form | 经 `Form.useForm()` 创建的 form 控制实例,不提供时会自动创建 | [FormInstance](#FormInstance) | - | | hideRequiredMark | 隐藏所有表单项的必选标记 | boolean | false | | initialValues | 表单默认值,只有初始化以及重置时生效 | object | - | -| labelAlign | label 标签的文本对齐方式 | 'left' \| 'right' | 'right' | +| labelAlign | label 标签的文本对齐方式 | `left` \| `right` | `right` | | labelCol | label 标签布局,同 `` 组件,设置 `span` `offset` 值,如 `{span: 3, offset: 12}` 或 `sm: {span: 3, offset: 12}` | [object](https://ant.design/components/grid/#Col) | - | -| layout | 表单布局 | 'horizontal'\|'vertical'\|'inline' | 'horizontal' | +| layout | 表单布局 | `horizontal` \| `vertical` \| `inline` | `horizontal` | | name | 表单名称,会作为表单字段 `id` 前缀使用 | string | - | -| 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) | - | | wrapperCol | 需要为输入控件设置布局样式时,使用该属性,用法同 labelCol | [object](https://ant.design/components/grid/#Col) | - | | onFinish | 提交表单且数据验证成功后回调事件 | Function(values) | - | @@ -78,7 +78,7 @@ const validateMessages = { | htmlFor | 设置子元素 label `htmlFor` 属性 | string | - | | noStyle | 为 `true` 时不带样式,作为纯字段控件使用 | boolean | false | | label | `label` 标签的文本 | string\|ReactNode | - | -| labelAlign | 标签文本对齐方式 | 'left' \| 'right' | 'right' | +| 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) | - | | normalize | 转换字段值给控件 | (value, prevValue, prevValues) => any | - | diff --git a/components/grid/index.en-US.md b/components/grid/index.en-US.md index f894ff2b35..45ee84de4a 100644 --- a/components/grid/index.en-US.md +++ b/components/grid/index.en-US.md @@ -88,9 +88,9 @@ If the Ant Design grid layout component does not meet your needs, you can use th | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | -| align | vertical alignment | `top` `middle` `bottom` | `top` | | +| align | vertical alignment | `top` \| `middle` \| `bottom` | `top` | | | gutter | spacing between grids, could be a number or a object like `{ xs: 8, sm: 16, md: 24}`. or you can use array to make horizontal and vertical spacing work at the same time `[horizontal, vertical]` | number/object/array | 0 | | | -| justify | horizontal arrangement | `start` `end` `center` `space-around` `space-between` | `start` | | +| justify | horizontal arrangement | `start` \| `end` \| `center` \| `space-around` \| `space-between` | `start` | | ### Col diff --git a/components/grid/index.zh-CN.md b/components/grid/index.zh-CN.md index 49306e1c9c..dc995003b3 100644 --- a/components/grid/index.zh-CN.md +++ b/components/grid/index.zh-CN.md @@ -87,9 +87,9 @@ Ant Design 的布局组件若不能满足你的需求,你也可以直接使用 | 成员 | 说明 | 类型 | 默认值 | 版本 | | --- | --- | --- | --- | --- | -| align | 垂直对齐方式 | `top` `middle` `bottom` | `top` | | +| align | 垂直对齐方式 | `top` \| `middle` \| `bottom` | `top` | | | gutter | 栅格间隔,可以写成像素值或支持响应式的对象写法来设置水平间隔 `{ xs: 8, sm: 16, md: 24}`。或者使用数组形式同时设置 `[水平间距, 垂直间距]`。 | number/object/array | 0 | | -| justify | 水平排列方式 | `start` `end` `center` `space-around` `space-between` | `start` | | +| justify | 水平排列方式 | `start` \| `end` \| `center` \| `space-around` \| `space-between` | `start` | | ### Col diff --git a/components/layout/index.en-US.md b/components/layout/index.en-US.md index eee8341c79..e12e819bff 100644 --- a/components/layout/index.en-US.md +++ b/components/layout/index.en-US.md @@ -87,7 +87,7 @@ The sidebar. | Property | Description | Type | Default | | --- | --- | --- | --- | -| breakpoint | [breakpoints](/components/grid#Col) of the responsive layout | Enum { 'xs', 'sm', 'md', 'lg', 'xl', 'xxl' } | - | +| breakpoint | [breakpoints](/components/grid#Col) of the responsive layout | `xs` \| `sm` \| `md` \| `lg` \| `xl` \| `xxl` } | - | | className | container className | string | - | | collapsed | to set the current status | boolean | - | | collapsedWidth | width of the collapsed sidebar, by setting to `0` a special trigger will appear | number | 80 | @@ -95,7 +95,7 @@ The sidebar. | defaultCollapsed | to set the initial status | boolean | false | | reverseArrow | reverse direction of arrow, for a sider that expands from the right | boolean | false | | style | to customize the styles | object | - | -| theme | color theme of the sidebar | string: `light` `dark` | `dark` | +| theme | color theme of the sidebar | `light` \| `dark` | `dark` | | trigger | specify the customized trigger, set to null to hide the trigger | string\|ReactNode | - | | width | width of the sidebar | number\|string | 200 | | onCollapse | the callback function, executed by clicking the trigger or activating the responsive layout | (collapsed, type) => {} | - | diff --git a/components/layout/index.zh-CN.md b/components/layout/index.zh-CN.md index 70c4fd8c20..adee993f95 100644 --- a/components/layout/index.zh-CN.md +++ b/components/layout/index.zh-CN.md @@ -88,7 +88,7 @@ title: Layout | 参数 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | -| breakpoint | 触发响应式布局的[断点](/components/grid-cn/#Col) | Enum { 'xs', 'sm', 'md', 'lg', 'xl', 'xxl' } | - | +| breakpoint | 触发响应式布局的[断点](/components/grid-cn/#Col) | `xs` \| `sm` \| `md` \| `lg` \| `xl` \| `xxl` | - | | className | 容器 className | string | - | | collapsed | 当前收起状态 | boolean | - | | collapsedWidth | 收缩宽度,设置为 0 会出现特殊 trigger | number | 80 | @@ -96,7 +96,7 @@ title: Layout | defaultCollapsed | 是否默认收起 | boolean | false | | reverseArrow | 翻转折叠提示箭头的方向,当 Sider 在右边时可以使用 | boolean | false | | style | 指定样式 | object | - | -| theme | 主题颜色 | string: `light` `dark` | `dark` | +| theme | 主题颜色 | `light` \| `dark` | `dark` | | trigger | 自定义 trigger,设置为 null 时隐藏 trigger | string\|ReactNode | - | | width | 宽度 | number\|string | 200 | | onCollapse | 展开-收起时的回调函数,有点击 trigger 以及响应式反馈两种方式可以触发 | (collapsed, type) => {} | - | diff --git a/components/list/index.en-US.md b/components/list/index.en-US.md index 009cb4b95a..bf9457e0ea 100644 --- a/components/list/index.en-US.md +++ b/components/list/index.en-US.md @@ -37,7 +37,7 @@ Properties for pagination. | Property | Description | Type | Default | | -------- | ------------------------------------ | --------------------------- | -------- | -| position | specify the position of `Pagination` | 'top' \| 'bottom' \| 'both' | 'bottom' | +| position | specify the position of `Pagination` | `top` \| `bottom` \| `both` | `bottom` | More about pagination, please check [`Pagination`](/components/pagination/). diff --git a/components/list/index.zh-CN.md b/components/list/index.zh-CN.md index b0fc4385f1..a9beeff876 100644 --- a/components/list/index.zh-CN.md +++ b/components/list/index.zh-CN.md @@ -38,7 +38,7 @@ cols: 1 | 参数 | 说明 | 类型 | 默认值 | | -------- | ------------------ | --------------------------- | -------- | -| position | 指定分页显示的位置 | 'top' \| 'bottom' \| 'both' | 'bottom' | +| position | 指定分页显示的位置 | `top` \| `bottom` \| `both` | `bottom` | 更多配置项,请查看 [`Pagination`](/components/pagination/)。 diff --git a/components/mentions/index.en-US.md b/components/mentions/index.en-US.md index e95241c2fe..559c3582e7 100644 --- a/components/mentions/index.en-US.md +++ b/components/mentions/index.en-US.md @@ -26,7 +26,7 @@ When need to mention someone or something. | defaultValue | Default value | string | | | filterOption | Customize filter option logic | false \| (input: string, option: OptionProps) => boolean | | | notFoundContent | Set mentions content when not match | ReactNode | 'Not Found' | -| placement | Set popup placement | 'top' \| 'bottom' | 'bottom' | +| placement | Set popup placement | `top` \| `bottom` | `bottom` | | prefix | Set trigger prefix keyword | string \| string[] | '@' | | split | Set split string before and after selected mention | string | ' ' | | validateSearch | Customize trigger search logic | (text: string, props: MentionsProps) => void | | diff --git a/components/mentions/index.zh-CN.md b/components/mentions/index.zh-CN.md index b7ebb74fb0..cc477d3504 100644 --- a/components/mentions/index.zh-CN.md +++ b/components/mentions/index.zh-CN.md @@ -27,7 +27,7 @@ title: Mentions | defaultValue | 默认值 | string | | | filterOption | 自定义过滤逻辑 | false \| (input: string, option: OptionProps) => boolean | | | notFoundContent | 当下拉列表为空时显示的内容 | ReactNode | 'Not Found' | -| placement | 弹出层展示位置 | 'top' \| 'bottom' | 'bottom' | +| placement | 弹出层展示位置 | `top` \| `bottom` | `bottom` | | prefix | 设置触发关键字 | string \| string[] | '@' | | split | 设置选中项前后分隔符 | string | ' ' | | validateSearch | 自定义触发验证逻辑 | (text: string, props: MentionsProps) => void | | diff --git a/components/menu/index.en-US.md b/components/menu/index.en-US.md index 3e6d514540..ff1af01b37 100644 --- a/components/menu/index.en-US.md +++ b/components/menu/index.en-US.md @@ -33,7 +33,7 @@ More layouts with navigation: [Layout](/components/layout). | forceSubMenuRender | Render submenu into DOM before it becomes visible | boolean | false | | | inlineCollapsed | Specifies the collapsed status when menu is inline mode | boolean | - | | | inlineIndent | Indent (in pixels) of inline menu items on each level | number | 24 | | -| mode | Type of menu; `vertical`, `horizontal`, or `inline` | string: `vertical` \| `horizontal` \| `inline` | `vertical` | | +| mode | Type of menu; `vertical`, `horizontal`, or `inline` | `vertical` \| `horizontal` \| `inline` | `vertical` | | | multiple | Allows selection of multiple items | boolean | false | | | openKeys | Array with the keys of currently opened sub-menus | string\[] | | | | selectable | Allows selecting menu items | boolean | true | | @@ -41,7 +41,7 @@ More layouts with navigation: [Layout](/components/layout). | style | Style of the root node | object | | | | subMenuCloseDelay | Delay time to hide submenu when mouse leaves (in seconds) | number | 0.1 | | | subMenuOpenDelay | Delay time to show submenu when mouse enters, (in seconds) | number | 0 | | -| theme | Color theme of the menu | string: `light` \| `dark` | `light` | | +| theme | Color theme of the menu | `light` \| `dark` | `light` | | | onClick | Called when a menu item is clicked | function({ item, key, keyPath, domEvent }) | - | | | onDeselect | Called when a menu item is deselected (multiple mode only) | function({ item, key, keyPath, selectedKeys, domEvent }) | - | | | onOpenChange | Called when sub-menus are opened or closed | function(openKeys: string\[]) | noop | | diff --git a/components/menu/index.zh-CN.md b/components/menu/index.zh-CN.md index 0c4582619c..1675fc71ed 100644 --- a/components/menu/index.zh-CN.md +++ b/components/menu/index.zh-CN.md @@ -34,7 +34,7 @@ subtitle: 导航菜单 | forceSubMenuRender | 在子菜单展示之前就渲染进 DOM | boolean | false | | | inlineCollapsed | inline 时菜单是否收起状态 | boolean | - | | | inlineIndent | inline 模式的菜单缩进宽度 | number | 24 | | -| mode | 菜单类型,现在支持垂直、水平、和内嵌模式三种 | string: `vertical` `horizontal` `inline` | `vertical` | | +| mode | 菜单类型,现在支持垂直、水平、和内嵌模式三种 | `vertical` \| `horizontal` \| `inline` | `vertical` | | | multiple | 是否允许多选 | boolean | false | | | openKeys | 当前展开的 SubMenu 菜单项 key 数组 | string\[] | | | | selectable | 是否允许选中 | boolean | true | | @@ -42,7 +42,7 @@ subtitle: 导航菜单 | style | 根节点样式 | object | | | | subMenuCloseDelay | 用户鼠标离开子菜单后关闭延时,单位:秒 | number | 0.1 | | | subMenuOpenDelay | 用户鼠标进入子菜单后开启延时,单位:秒 | number | 0 | | -| theme | 主题颜色 | string: `light` `dark` | `light` | | +| theme | 主题颜色 | `light` \| `dark` | `light` | | | onClick | 点击 MenuItem 调用此函数 | function({ item, key, keyPath, domEvent }) | - | | | onDeselect | 取消选中时调用,仅在 multiple 生效 | function({ item, key, keyPath, selectedKeys, domEvent }) | - | | | onOpenChange | SubMenu 展开/关闭的回调 | function(openKeys: string\[]) | noop | | diff --git a/components/modal/index.en-US.md b/components/modal/index.en-US.md index c737ff33e1..ac1f1712ca 100644 --- a/components/modal/index.en-US.md +++ b/components/modal/index.en-US.md @@ -59,7 +59,7 @@ The items listed above are all functions, expecting a settings object as paramet | Property | Description | Type | Default | | --- | --- | --- | --- | -| autoFocusButton | Specify which button to autofocus | null\|string: `ok` `cancel` | `ok` | +| autoFocusButton | Specify which button to autofocus | null\| `ok` \| `cancel` | `ok` | | cancelText | Text of the Cancel button with Modal.confirm | string | `Cancel` | | centered | Centered Modal | Boolean | `false` | | className | className of container | string | - | diff --git a/components/modal/index.zh-CN.md b/components/modal/index.zh-CN.md index ae8e4a1d9e..a7f4d282a3 100644 --- a/components/modal/index.zh-CN.md +++ b/components/modal/index.zh-CN.md @@ -63,7 +63,7 @@ title: Modal | 参数 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | -| autoFocusButton | 指定自动获得焦点的按钮 | null\|string: `ok` `cancel` | `ok` | +| autoFocusButton | 指定自动获得焦点的按钮 | null\| `ok` \| `cancel` | `ok` | | cancelText | 设置 Modal.confirm 取消按钮文字 | string | 取消 | | centered | 垂直居中展示 Modal | Boolean | `false` | | className | 容器类名 | string | - | diff --git a/components/progress/index.en-US.md b/components/progress/index.en-US.md index ce7048a920..6f72154fc4 100644 --- a/components/progress/index.en-US.md +++ b/components/progress/index.en-US.md @@ -24,7 +24,7 @@ Properties that shared by all types. | percent | to set the completion percentage | number | 0 | | showInfo | whether to display the progress value and the status icon | boolean | true | | status | to set the status of the Progress, options: `success` `exception` `normal` `active`(line only) | string | - | -| strokeLinecap | to set the style of the progress linecap | Enum{ 'round', 'square' } | `round` | +| strokeLinecap | to set the style of the progress linecap | `round` \| `square` | `round` | | strokeColor | color of progress bar | string | - | | successPercent | segmented success percent | number | 0 | diff --git a/components/progress/index.zh-CN.md b/components/progress/index.zh-CN.md index 6a9f82445e..2262f17173 100644 --- a/components/progress/index.zh-CN.md +++ b/components/progress/index.zh-CN.md @@ -25,7 +25,7 @@ title: Progress | percent | 百分比 | number | 0 | | showInfo | 是否显示进度数值或状态图标 | boolean | true | | status | 状态,可选:`success` `exception` `normal` `active`(仅限 line) | string | - | -| strokeLinecap | - | Enum{ 'round', 'square' } | `round` | +| strokeLinecap | - | `round` \| `square` | `round` | | strokeColor | 进度条的色彩 | string | - | | successPercent | 已完成的分段百分比 | number | 0 | @@ -52,4 +52,4 @@ title: Progress | width | 仪表盘进度条画布宽度,单位 px | number | 132 | | strokeWidth | 仪表盘进度条线的宽度,单位是进度条画布宽度的百分比 | number | 6 | | gapDegree | 仪表盘进度条缺口角度,可取值 0 ~ 360 | number | 0 | -| gapPosition | 仪表盘进度条缺口位置 | Enum{ 'top', 'bottom', 'left', 'right' } | `top` | +| gapPosition | 仪表盘进度条缺口位置 | `top` \| `bottom` \| `left` \| `right` | `top` | diff --git a/components/result/index.en-US.md b/components/result/index.en-US.md index 5578f82c54..c5f2a6f46b 100644 --- a/components/result/index.en-US.md +++ b/components/result/index.en-US.md @@ -18,6 +18,6 @@ Use when important operations need to inform the user to process the results and | --- | --- | --- | --- | | title | title string | ReactNode | - | | subTitle | subTitle string | ReactNode | - | -| status | result status,decide icons and colors | `'success' | 'error' | 'info' | 'warning'| '404' | '403' | '500'` | 'info' | +| status | result status,decide icons and colors | `success` \| `error` \| `info` \| `warning` \| `404` \| `403` \| `500` | `info` | | icon | custom back icon | ReactNode | - | | extra | operating area | ReactNode | - | diff --git a/components/result/index.zh-CN.md b/components/result/index.zh-CN.md index 409be9f05d..430256908c 100644 --- a/components/result/index.zh-CN.md +++ b/components/result/index.zh-CN.md @@ -18,6 +18,6 @@ subtitle: 结果 | --- | --- | --- | --- | | title | title 文字 | ReactNode | - | | subTitle | subTitle 文字 | ReactNode | - | -| status | 结果的状态,决定图标和颜色 | `'success' | 'error' | 'info' | 'warning'| '404' | '403' | '500'` | 'info' | +| status | 结果的状态,决定图标和颜色 | `success` \| `error` \| `info` \| `warning` \| `404` \| `403` \| `500` | `info` | | icon | 自定义 icon | ReactNode | - | | extra | 操作区 | ReactNode | - | diff --git a/components/skeleton/index.en-US.md b/components/skeleton/index.en-US.md index 4464d13a16..90f740558b 100644 --- a/components/skeleton/index.en-US.md +++ b/components/skeleton/index.en-US.md @@ -31,8 +31,8 @@ Provide a placeholder while you wait for content to load, or to visualise conten | Property | Description | Type | Default | | --- | --- | --- | --- | | active | Show animation effect, only valid when used avatar independently. | boolean | false | -| size | Set the size of avatar | number \| Enum{ 'large', 'small', 'default' } | - | -| shape | Set the shape of avatar | Enum{ 'circle', 'square' } | - | +| size | Set the size of avatar | number \| `large` \| `small` \| `default` } | - | +| shape | Set the shape of avatar | `circle` \| `square` | - | ### SkeletonTitleProps @@ -49,15 +49,15 @@ Provide a placeholder while you wait for content to load, or to visualise conten ### SkeletonButtonProps -| Property | Description | Type | Default | -| -------- | ----------------------- | ------------------------------------ | ------- | -| active | Show animation effect | boolean | false | -| size | Set the size of button | Enum{ 'large', 'small', 'default' } | - | -| shape | Set the shape of button | Enum{ 'circle', 'round', 'default' } | - | +| Property | Description | Type | Default | +| -------- | ----------------------- | -------------------------------- | ------- | +| active | Show animation effect | boolean | false | +| size | Set the size of button | `large` \| `small` \| `default` | - | +| shape | Set the shape of button | `circle` \| `round` \| `default` | - | ### SkeletonInputProps -| Property | Description | Type | Default | -| -------- | ---------------------- | ----------------------------------- | ------- | -| active | Show animation effect | boolean | false | -| size | Set the size of button | Enum{ 'large', 'small', 'default' } | - | +| Property | Description | Type | Default | +| -------- | ---------------------- | ------------------------------- | ------- | +| active | Show animation effect | boolean | false | +| size | Set the size of button | `large` \| `small` \| `default` | - | diff --git a/components/skeleton/index.zh-CN.md b/components/skeleton/index.zh-CN.md index 79d91cc891..11767ae005 100644 --- a/components/skeleton/index.zh-CN.md +++ b/components/skeleton/index.zh-CN.md @@ -32,8 +32,8 @@ cols: 1 | 属性 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | | active | 是否展示动画效果,仅在单独使用头像骨架时生效 | boolean | false | -| size | 设置头像占位图的大小 | number \| Enum{ 'large', 'small', 'default' } | - | -| shape | 指定头像的形状 | Enum{ 'circle', 'square' } | - | +| size | 设置头像占位图的大小 | number \| `large` \| `small` \| `default` | - | +| shape | 指定头像的形状 | `circle` \| `square` | - | ### SkeletonTitleProps @@ -50,15 +50,15 @@ cols: 1 ### SkeletonButtonProps -| 属性 | 说明 | 类型 | 默认值 | -| ------ | ---------------- | ------------------------------------ | ------ | -| active | 是否展示动画效果 | boolean | false | -| size | 设置按钮的大小 | Enum{ 'large', 'small', 'default' } | - | -| shape | 指定按钮的形状 | Enum{ 'circle', 'round', 'default' } | - | +| 属性 | 说明 | 类型 | 默认值 | +| ------ | ---------------- | -------------------------------- | ------ | +| active | 是否展示动画效果 | boolean | false | +| size | 设置按钮的大小 | `large` \| `small` \| `default` | - | +| shape | 指定按钮的形状 | `circle` \| `round` \| `default` | - | ### SkeletonInputProps -| 属性 | 说明 | 类型 | 默认值 | -| ------ | ---------------- | ----------------------------------- | ------ | -| active | 是否展示动画效果 | boolean | false | -| size | 设置按钮的大小 | Enum{ 'large', 'small', 'default' } | - | +| 属性 | 说明 | 类型 | 默认值 | +| ------ | ---------------- | ------------------------------- | ------ | +| active | 是否展示动画效果 | boolean | false | +| size | 设置按钮的大小 | `large` \| `small` \| `default` | - | diff --git a/components/table/index.en-US.md b/components/table/index.en-US.md index 78da33f7ec..7ffd437b58 100644 --- a/components/table/index.en-US.md +++ b/components/table/index.en-US.md @@ -59,7 +59,7 @@ const columns = [ | Property | Description | Type | Default | | --- | --- | --- | --- | -| tableLayout | [table-layout](https://developer.mozilla.org/en-US/docs/Web/CSS/table-layout) attribute of table element | - \| 'auto' \| 'fixed' | -
`fixed` when header/columns are fixed, or using `column.ellipsis` | +| tableLayout | [table-layout](https://developer.mozilla.org/en-US/docs/Web/CSS/table-layout) attribute of table element | - \| `auto` \| `fixed` | -
`fixed` when header/columns are fixed, or using `column.ellipsis` | | bordered | Whether to show all table borders | boolean | `false` | | columns | Columns of table | [ColumnProps](#Column)\[] | - | | components | Override default table elements | [TableComponents](https://git.io/fANxz) | - | @@ -111,13 +111,13 @@ One of the Table `columns` prop for describing the table's columns, Column has t | Property | Description | Type | Default | | --- | --- | --- | --- | -| align | specify which way that column is aligned | 'left' \| 'right' \| 'center' | 'left' | +| align | specify which way that column is aligned | `left` \| `right` \| `center` | `left` | | ellipsis | ellipsis cell content, not working with sorter and filters for now.
tableLayout would be `fixed` when `ellipsis` is true. | boolean | false | | className | className of this column | string | - | | colSpan | Span of this column's title | number | - | | dataIndex | Display field of the data record, support nest path by string array | string \| string\[] | - | | defaultFilteredValue | Default filtered values | string\[] | - | | -| defaultSortOrder | Default order of sorted values | 'ascend' \| 'descend' | - | +| defaultSortOrder | Default order of sorted values | `ascend` \| `descend` | - | | filterDropdown | Customized filter overlay | React.ReactNode \| (props: [FilterDropdownProps](https://git.io/fjP5h)) => React.ReactNode | - | | filterDropdownVisible | Whether `filterDropdown` is visible | boolean | - | | filtered | Whether the `dataSource` is filtered | boolean | `false` | @@ -150,7 +150,7 @@ Properties for pagination. | Property | Description | Type | Default | | -------- | ------------------------------------ | --------------------------- | -------- | -| position | specify the position of `Pagination` | 'top' \| 'bottom' \| 'both' | 'bottom' | +| position | specify the position of `Pagination` | `top` \| `bottom` \| `both` | `bottom` | More about pagination, please check [`Pagination`](/components/pagination/). diff --git a/components/table/index.zh-CN.md b/components/table/index.zh-CN.md index d541f421fd..157d534ebe 100644 --- a/components/table/index.zh-CN.md +++ b/components/table/index.zh-CN.md @@ -64,7 +64,7 @@ const columns = [ | 参数 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | -| tableLayout | 表格元素的 [table-layout](https://developer.mozilla.org/zh-CN/docs/Web/CSS/table-layout) 属性,设为 `fixed` 表示内容不会影响列的布局 | - \| 'auto' \| 'fixed' | 无
固定表头/列或使用了 `column.ellipsis` 时,默认值为 `fixed` | +| tableLayout | 表格元素的 [table-layout](https://developer.mozilla.org/zh-CN/docs/Web/CSS/table-layout) 属性,设为 `fixed` 表示内容不会影响列的布局 | - \| `auto` \| `fixed` | 无
固定表头/列或使用了 `column.ellipsis` 时,默认值为 `fixed` | | bordered | 是否展示外边框和列边框 | boolean | false | | columns | 表格列的配置描述,具体项见下表 | [ColumnProps](#Column)\[] | - | | components | 覆盖默认的 table 元素 | [TableComponents](https://git.io/fANxz) | - | @@ -79,7 +79,7 @@ const columns = [ | rowSelection | 表格行是否可选择,[配置项](#rowSelection) | object | null | | scroll | 表格是否可滚动,[配置项](#scroll) | object | - | | showHeader | 是否显示表头 | boolean | true | -| size | 表格大小 | default \| middle \| small | default | +| size | 表格大小 | `default` \| `middle` \| `small` | default | | summary | 总结栏 | (currentData) => ReactNode | - | | title | 表格标题 | Function(currentPageData) | - | | onChange | 分页、排序、筛选变化时触发 | Function(pagination, filters, sorter, extra: { currentDataSource: [] }) | - | @@ -116,13 +116,13 @@ const columns = [ | 参数 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | -| align | 设置列的对齐方式 | 'left' \| 'right' \| 'center' | 'left' | +| align | 设置列的对齐方式 | `left` \| `right` \| `center` | `left` | | ellipsis | 超过宽度将自动省略,暂不支持和排序筛选一起使用。
设置为 `true` 时,表格布局将变成 `tableLayout="fixed"`。 | boolean | false | | className | 列样式类名 | string | - | | colSpan | 表头列合并,设置为 0 时,不渲染 | number | - | | dataIndex | 列数据在数据项中对应的路径,支持通过数组查询嵌套路径 | string \| string\[] | - | | defaultFilteredValue | 默认筛选值 | string\[] | - | -| defaultSortOrder | 默认排序顺序 | 'ascend' \| 'descend' | - | +| defaultSortOrder | 默认排序顺序 | `ascend` \| `descend` | - | | filterDropdown | 可以自定义筛选菜单,此函数只负责渲染图层,需要自行编写各种交互 | React.ReactNode \| (props: [FilterDropdownProps](https://git.io/fjP5h)) => React.ReactNode | - | | filterDropdownVisible | 用于控制自定义筛选菜单是否可见 | boolean | - | | filtered | 标识数据是否经过过滤,筛选图标会高亮 | boolean | false | @@ -155,7 +155,7 @@ const columns = [ | 参数 | 说明 | 类型 | 默认值 | | -------- | ------------------ | --------------------------- | -------- | -| position | 指定分页显示的位置 | 'top' \| 'bottom' \| 'both' | 'bottom' | +| position | 指定分页显示的位置 | `top` \| `bottom` \| `both` | `bottom` | 更多配置项,请查看 [`Pagination`](/components/pagination/)。 diff --git a/components/transfer/index.en-US.md b/components/transfer/index.en-US.md index fe18d14cda..3a89d54cd7 100644 --- a/components/transfer/index.en-US.md +++ b/components/transfer/index.en-US.md @@ -47,7 +47,7 @@ Transfer accept `children` to customize render list, using follow props: | Property | Description | Type | Version | | --------------- | ----------------------- | ----------------------------------- | ------- | -| direction | List render direction | 'left' \| 'right' | | +| direction | List render direction | `left` \| `right` | | | disabled | Disable list or not | boolean | | | filteredItems | Filtered items | TransferItem[] | | | onItemSelect | Select item | (key: string, selected: boolean) | | diff --git a/components/transfer/index.zh-CN.md b/components/transfer/index.zh-CN.md index efde9f83d6..1e54a14fc7 100644 --- a/components/transfer/index.zh-CN.md +++ b/components/transfer/index.zh-CN.md @@ -49,7 +49,7 @@ Transfer 支持接收 `children` 自定义渲染列表,并返回以下参数 | 参数 | 说明 | 类型 | 版本 | | --------------- | -------------- | ----------------------------------- | ---- | -| direction | 渲染列表的方向 | 'left' \| 'right' | | +| direction | 渲染列表的方向 | `left` \| `right` | | | disabled | 是否禁用列表 | boolean | | | filteredItems | 过滤后的数据 | TransferItem[] | | | onItemSelect | 勾选条目 | (key: string, selected: boolean) | | diff --git a/components/typography/index.en-US.md b/components/typography/index.en-US.md index ac6b624a55..f3bbb18d54 100644 --- a/components/typography/index.en-US.md +++ b/components/typography/index.en-US.md @@ -28,7 +28,7 @@ Basic text writing, including headings, body text, lists, and more. | underline | Underlined style | boolean | false | | | onChange | Trigger when user edits the content | Function(string) | - | | | strong | Bold style | boolean | false | | -| type | Content type | `secondary`, `warning`, `danger` | - | | +| type | Content type | `secondary` \| `warning` \| `danger` | - | | ### Typography.Title @@ -44,7 +44,7 @@ Basic text writing, including headings, body text, lists, and more. | mark | Marked style | boolean | false | | | underline | Underlined style | boolean | false | | | onChange | Trigger when user edits the content | Function(string) | - | | -| type | Content type | `secondary`, `warning`, `danger` | - | | +| type | Content type | `secondary` \| `warning` \| `danger` | - | | ### Typography.Paragraph @@ -60,4 +60,4 @@ Basic text writing, including headings, body text, lists, and more. | underline | Underlined style | boolean | false | | | onChange | Trigger when user edits the content | Function(string) | - | | | strong | Bold style | boolean | false | | -| type | Content type | `secondary`, `warning`, `danger` | - | | +| type | Content type | `secondary` \| `warning` \| `danger` | - | | diff --git a/components/typography/index.zh-CN.md b/components/typography/index.zh-CN.md index c6c6d5bd5d..fbe5c11150 100644 --- a/components/typography/index.zh-CN.md +++ b/components/typography/index.zh-CN.md @@ -28,7 +28,7 @@ cols: 1 | code | 添加代码样式 | boolean | false | | | underline | 添加下划线样式 | boolean | false | | | strong | 是否加粗 | boolean | false | | -| type | 文本类型 | `secondary`, `warning`, `danger` | - | | +| type | 文本类型 | `secondary` \| `warning` \| `danger` | - | | ### Typography.Title @@ -43,7 +43,7 @@ cols: 1 | mark | 添加标记样式 | boolean | false | | | underline | 添加下划线样式 | boolean | false | | | onChange | 当用户提交编辑内容时触发 | Function(string) | - | | -| type | 文本类型 | `secondary`, `warning`, `danger` | - | | +| type | 文本类型 | `secondary` \| `warning` \| `danger` | - | | ### Typography.Paragraph @@ -58,4 +58,4 @@ cols: 1 | underline | 添加下划线样式 | boolean | false | | | onChange | 当用户提交编辑内容时触发 | Function(string) | - | | | strong | 是否加粗 | boolean | false | | -| type | 文本类型 | `secondary`, `warning`, `danger` | - | | +| type | 文本类型 | `secondary` \| `warning` \| `danger` | - | |