mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
docs: Sort api table
This commit is contained in:
parent
1af1534592
commit
999d6184ad
@ -41,5 +41,5 @@ const dataSource = ['12345', '23456', '34567'];
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
| focus() | get focus |
|
||||
|
@ -41,6 +41,6 @@ const dataSource = ['12345', '23456', '34567'];
|
||||
## 方法
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| --- | --- |
|
||||
| blur() | 移除焦点 |
|
||||
| focus() | 获取焦点 |
|
||||
|
@ -26,8 +26,8 @@ Badge normally appears in proximity to notifications or user avatars with eye-ca
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| count | Number to show in badge | number | |
|
||||
| dot | Whether to display a red dot instead of `count` | boolean | `false` |
|
||||
| offset | set offset of the badge dot, like [x, y] | [number, number] | - |
|
||||
| overflowCount | Max count to show | number | 99 |
|
||||
| showZero | Whether to show badge when `count` is zero | boolean | `false` |
|
||||
| status | Set Badge as a status dot | `success` \| `processing` \| `default` \| `error` \| `warning` | `''` |
|
||||
| text | If `status` is set, `text` sets the display text of the status `dot` | string | `''` |
|
||||
| offset | set offset of the badge dot, like [x, y] | [number, number] | - |
|
||||
|
@ -27,8 +27,8 @@ title: Badge
|
||||
| --- | --- | --- | --- |
|
||||
| count | 展示的数字,大于 overflowCount 时显示为 `${overflowCount}+`,为 0 时隐藏 | number | |
|
||||
| dot | 不展示数字,只有一个小红点 | boolean | false |
|
||||
| offset | 设置状态点的位置偏移,格式为 [x, y] | [number, number] | - |
|
||||
| overflowCount | 展示封顶的数字值 | number | 99 |
|
||||
| showZero | 当数值为 0 时,是否展示 Badge | boolean | false |
|
||||
| status | 设置 Badge 为状态点 | Enum{ 'success', 'processing, 'default', 'error', 'warning' } | '' |
|
||||
| text | 在设置了 `status` 的前提下有效,设置状态点的文本 | string | '' |
|
||||
| offset | 设置状态点的位置偏移,格式为 [x, y] | [number, number] | - |
|
||||
|
@ -17,15 +17,15 @@ To get a customized button, just set `type`/`shape`/`size`/`loading`/`disabled`.
|
||||
| Property | Description | Type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| ghost | make background transparent and invert text and border colors, added in 2.7 | boolean | false |
|
||||
| href | redirect url of link button | string | - |
|
||||
| htmlType | set the original html `type` of `button`, see: [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type) | string | `button` |
|
||||
| icon | set the icon of button, see: Icon component | string | - |
|
||||
| loading | set the loading status of button | boolean \| { delay: number } | false |
|
||||
| shape | can be set to `circle` or omitted | string | - |
|
||||
| size | can be set to `small` `large` or omitted | string | `default` |
|
||||
| target | same as target attribute of a, works when href is specified | string | - |
|
||||
| type | can be set to `primary` `ghost` `dashed` `danger`(added in 2.7) or omitted (meaning `default`) | string | `default` |
|
||||
| onClick | set the handler to handle `click` event | function | - |
|
||||
| href | redirect url of link button | string | - |
|
||||
| target | same as target attribute of a, works when href is specified | string | - |
|
||||
|
||||
`<Button>Hello world!</Button>` will be rendered into `<button><span>Hello world!</span></button>`, and all the properties which are not listed above will be transferred to the `<button>` tag.
|
||||
|
||||
|
@ -20,16 +20,15 @@ subtitle: 按钮
|
||||
| 属性 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| ghost | 幽灵属性,使按钮背景透明,版本 2.7 中增加 | boolean | false |
|
||||
| href | 点击跳转的地址,指定此属性 button 的行为和 a 链接一致 | string | - |
|
||||
| htmlType | 设置 `button` 原生的 `type` 值,可选值请参考 [HTML 标准](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type) | string | `button` |
|
||||
| icon | 设置按钮的图标类型 | string | - |
|
||||
| loading | 设置按钮载入状态 | boolean \| { delay: number } | `false` |
|
||||
| shape | 设置按钮形状,可选值为 `circle` 或者不设 | string | - |
|
||||
| size | 设置按钮大小,可选值为 `small` `large` 或者不设 | string | `default` |
|
||||
| target | 相当于 a 链接的 target 属性,href 存在时生效 | string | - |
|
||||
| type | 设置按钮类型,可选值为 `primary` `dashed` `danger`(版本 2.7 中增加) 或者不设 | string | - |
|
||||
| onClick | `click` 事件的 handler | function | - |
|
||||
| href | 点击跳转的地址,指定此属性 button 的行为和 a 链接一致 | string | - |
|
||||
| target | 相当于 a 链接的 target 属性,href 存在时生效 | string | - |
|
||||
|
||||
|
||||
`<Button>Hello world!</Button>` 最终会被渲染为 `<button><span>Hello world!</span></button>`,并且除了上表中的属性,其它属性都会直接传到 `<button></button>`。
|
||||
|
||||
|
@ -35,13 +35,13 @@ Cascade selection box.
|
||||
| placeholder | input placeholder | string | 'Please select' |
|
||||
| popupClassName | additional className of popup overlay | string | - |
|
||||
| popupPlacement | use preset popup align config from builtinPlacements:`bottomLeft` `bottomRight` `topLeft` `topRight` | string | `bottomLeft` |
|
||||
| popupVisible | set visible of cascader popup | boolean | - |
|
||||
| showSearch | Whether show search input in single mode. | boolean\|object | false |
|
||||
| size | input size, one of `large` `default` `small` | string | `default` |
|
||||
| style | additional style | string | - |
|
||||
| value | selected value | string\[] | - |
|
||||
| onChange | callback when finishing cascader select | `(value, selectedOptions) => void` | - |
|
||||
| onPopupVisibleChange | callback when popup shown or hidden | `(value) => void` | - |
|
||||
| popupVisible | set visible of cascader popup | boolean | - |
|
||||
|
||||
Fields in `showSearch`:
|
||||
|
||||
@ -56,8 +56,8 @@ Fields in `showSearch`:
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
| focus() | get focus |
|
||||
|
||||
<style>
|
||||
.ant-cascader-picker {
|
||||
|
@ -36,13 +36,13 @@ subtitle: 级联选择
|
||||
| placeholder | 输入框占位文本 | string | '请选择' |
|
||||
| popupClassName | 自定义浮层类名 | string | - |
|
||||
| popupPlacement | 浮层预设位置:`bottomLeft` `bottomRight` `topLeft` `topRight` | Enum | `bottomLeft` |
|
||||
| popupVisible | 控制浮层显隐 | boolean | - |
|
||||
| showSearch | 在选择框中显示搜索框 | boolean | false |
|
||||
| size | 输入框大小,可选 `large` `default` `small` | string | `default` |
|
||||
| style | 自定义样式 | string | - |
|
||||
| value | 指定选中项 | string\[] | - |
|
||||
| onChange | 选择完成后的回调 | `(value, selectedOptions) => void` | - |
|
||||
| onPopupVisibleChange | 显示/隐藏浮层的回调 | `(value) => void` | - |
|
||||
| popupVisible | 控制浮层显隐 | boolean | - |
|
||||
|
||||
`showSearch` 为对象时,其中的字段:
|
||||
|
||||
@ -56,9 +56,9 @@ subtitle: 级联选择
|
||||
## 方法
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| --- | --- |
|
||||
| blur() | 移除焦点 |
|
||||
| focus() | 获取焦点 |
|
||||
|
||||
<style>
|
||||
.ant-cascader-picker {
|
||||
|
@ -39,5 +39,5 @@ Checkbox.
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
| focus() | get focus |
|
||||
|
@ -38,6 +38,6 @@ title: Checkbox
|
||||
### Checkbox
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| --- | --- |
|
||||
| blur() | 移除焦点 |
|
||||
| focus() | 获取焦点 |
|
||||
|
@ -51,13 +51,12 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker, WeekPicke
|
||||
| style | to customize the style of the input box | object | {} |
|
||||
| onOpenChange | a callback function, can be executed whether the popup calendar is popped up or closed | function(status) | - |
|
||||
|
||||
|
||||
### Common Methods
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
| focus() | get focus |
|
||||
|
||||
### DatePicker
|
||||
|
||||
@ -71,8 +70,8 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker, WeekPicke
|
||||
| showTime.defaultValue | to set default time of selected date, [demo](https://ant.design/components/date-picker/#components-date-picker-demo-disabled-date) | [moment](http://momentjs.com/) | moment() |
|
||||
| showToday | whether to show "Today" button | boolean | true |
|
||||
| value | to set date | [moment](http://momentjs.com/) | - |
|
||||
| onChange | a callback function, can be executed when the selected time is changing | function(date: moment, dateString: string) | - |
|
||||
| onCalendarChange | a callback function, can be executed when the start time or the end time of the range is changing | function(dates: [moment, moment], dateStrings: [string, string]) | 无 |
|
||||
| onChange | a callback function, can be executed when the selected time is changing | function(date: moment, dateString: string) | - |
|
||||
| onOk | callback when click ok button | function() | - |
|
||||
|
||||
### MonthPicker
|
||||
@ -82,9 +81,9 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker, WeekPicke
|
||||
| defaultValue | to set default date | [moment](http://momentjs.com/) | - |
|
||||
| format | to set the date format, refer to [moment.js](http://momentjs.com/) | string | "YYYY-MM" |
|
||||
| monthCellContentRender | Custom month cell content render method | function(date, locale): ReactNode | - |
|
||||
| renderExtraFooter | render extra footer in panel | () => React.ReactNode | - |
|
||||
| value | to set date | [moment](http://momentjs.com/) | - |
|
||||
| onChange | a callback function, can be executed when the selected time is changing | function(date: moment, dateString: string) | - |
|
||||
| renderExtraFooter | render extra footer in panel | () => React.ReactNode | - |
|
||||
|
||||
### WeekPicker
|
||||
|
||||
|
@ -55,9 +55,9 @@ subtitle: 日期选择框
|
||||
### 共同的方法
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| --- | --- |
|
||||
| blur() | 移除焦点 |
|
||||
| focus() | 获取焦点 |
|
||||
|
||||
### DatePicker
|
||||
|
||||
@ -81,9 +81,9 @@ subtitle: 日期选择框
|
||||
| defaultValue | 默认日期 | [moment](http://momentjs.com/) | 无 |
|
||||
| format | 展示的日期格式,配置参考 [moment.js](http://momentjs.com/) | string | "YYYY-MM" |
|
||||
| monthCellContentRender | 自定义的月份内容渲染方法 | function(date, locale): ReactNode | - |
|
||||
| renderExtraFooter | 在面板中添加额外的页脚 | () => React.ReactNode | - |
|
||||
| value | 日期 | [moment](http://momentjs.com/) | 无 |
|
||||
| onChange | 时间发生变化的回调,发生在用户选择时间时 | function(date: moment, dateString: string) | - |
|
||||
| renderExtraFooter | 在面板中添加额外的页脚 | () => React.ReactNode | - |
|
||||
|
||||
### WeekPicker
|
||||
|
||||
@ -106,8 +106,8 @@ subtitle: 日期选择框
|
||||
| showTime | 增加时间选择功能 | Object\|boolean | [TimePicker Options](/components/time-picker/#API) |
|
||||
| showTime.defaultValue | 设置用户选择日期时默认的时分秒,[例子](https://ant.design/components/date-picker/#components-date-picker-demo-disabled-date) | [moment](http://momentjs.com/)\[] | [moment(), moment()] |
|
||||
| value | 日期 | [moment](http://momentjs.com/)\[] | 无 |
|
||||
| onChange | 日期范围发生变化的回调 | function(dates: [moment, moment], dateStrings: [string, string]) | 无 |
|
||||
| onCalendarChange | 待选日期发生变化的回调 | function(dates: [moment, moment], dateStrings: [string, string]) | 无 |
|
||||
| onChange | 日期范围发生变化的回调 | function(dates: [moment, moment], dateStrings: [string, string]) | 无 |
|
||||
| onOk | 点击确定按钮的回调 | function() | - |
|
||||
|
||||
<style>
|
||||
|
@ -18,5 +18,5 @@ A divider line separates different content.
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| dashed | whether line is dasded | Boolean | false |
|
||||
| type | direction type of divider | enum: `horizontal` `vertical` | `horizontal` |
|
||||
| dashed | whether line is dasded | Boolean | false
|
||||
|
@ -16,5 +16,5 @@ subtitle: 分割线
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| dashed | 是否虚线 | Boolean | false |
|
||||
| type | 水平还是垂直类型 | enum: `horizontal` `vertical` | `horizontal` |
|
||||
| dashed | 是否虚线 | Boolean | false
|
||||
|
@ -20,7 +20,7 @@ If there are too many operations to display, you can wrap them in a `Dropdown`.
|
||||
| getPopupContainer | to set the container of the dropdown menu. The default is to create a `div` element in `body`, you can reset it to the scrolling area and make a relative reposition. [example](https://codepen.io/afc163/pen/zEjNOy?editors=0010) | Function(triggerNode) | `() => document.body` |
|
||||
| overlay | the dropdown menu | [Menu](/components/menu) | - |
|
||||
| placement | placement of pop menu: `bottomLeft` `bottomCenter` `bottomRight` `topLeft` `topCenter` `topRight` | String | `bottomLeft` |
|
||||
| trigger | the trigger mode which executes the drop-down action | Array<`click`\|`hover`\|`contentMenu`> | `['hover']` |
|
||||
| trigger | the trigger mode which executes the drop-down action | Array<`click`\|`hover`\|`contentMenu`> | `['hover']` |
|
||||
| visible | whether the dropdown menu is visible | boolean | - |
|
||||
| onVisibleChange | a callback function takes an argument: `visible`, is executed when the visible state is changed | Function(visible) | - |
|
||||
|
||||
@ -38,7 +38,7 @@ You should use [Menu](/components/menu/) as `overlay`. The menu items and divide
|
||||
| overlay | the dropdown menu | [Menu](/components/menu) | - |
|
||||
| placement | placement of pop menu: `bottomLeft` `bottomCenter` `bottomRight` `topLeft` `topCenter` `topRight` | String | `bottomLeft` |
|
||||
| size | size of the button, the same as [Button](/components/button) | string | `default` |
|
||||
| trigger | the trigger mode which executes the drop-down action | Array<`click`\|`hover`\|`contextMenu`> | `['hover']` |
|
||||
| trigger | the trigger mode which executes the drop-down action | Array<`click`\|`hover`\|`contextMenu`> | `['hover']` |
|
||||
| type | type of the button, the same as [Button](/components/button) | string | `default` |
|
||||
| visible | whether the dropdown menu is visible | boolean | - |
|
||||
| onClick | a callback function, the same as [Button](/components/button), which will be executed when you click the button on the left | Function | - |
|
||||
|
@ -21,7 +21,7 @@ title: Dropdown
|
||||
| getPopupContainer | 菜单渲染父节点。默认渲染到 body 上,如果你遇到菜单滚动定位问题,试试修改为滚动的区域,并相对其定位。[示例](https://codepen.io/afc163/pen/zEjNOy?editors=0010) | Function(triggerNode) | `() => document.body` |
|
||||
| overlay | 菜单 | [Menu](/components/menu) | - |
|
||||
| placement | 菜单弹出位置:`bottomLeft` `bottomCenter` `bottomRight` `topLeft` `topCenter` `topRight` | String | `bottomLeft` |
|
||||
| trigger | 触发下拉的行为 | Array<`click`\|`hover`\|`contentMenu`> | `['hover']` |
|
||||
| trigger | 触发下拉的行为 | Array<`click`\|`hover`\|`contentMenu`> | `['hover']` |
|
||||
| visible | 菜单是否显示 | boolean | - |
|
||||
| onVisibleChange | 菜单显示状态改变时调用,参数为 visible | Function(visible) | - |
|
||||
|
||||
@ -39,7 +39,7 @@ title: Dropdown
|
||||
| overlay | 菜单 | [Menu](/components/menu/) | - |
|
||||
| placement | 菜单弹出位置:`bottomLeft` `bottomCenter` `bottomRight` `topLeft` `topCenter` `topRight` | String | `bottomLeft` |
|
||||
| size | 按钮大小,和 [Button](/components/button/) 一致 | string | 'default' |
|
||||
| trigger | 触发下拉的行为 | Array<`click`\|`hover`\|`contentMenu`> | `['hover']` |
|
||||
| trigger | 触发下拉的行为 | Array<`click`\|`hover`\|`contentMenu`> | `['hover']` |
|
||||
| type | 按钮类型,和 [Button](/components/button/) 一致 | string | 'default' |
|
||||
| visible | 菜单是否显示 | boolean | - |
|
||||
| onClick | 点击左侧按钮的回调,和 [Button](/components/button/) 一致 | Function | - |
|
||||
|
@ -53,8 +53,8 @@ The following `options` are available:
|
||||
|
||||
| Property | Description | Type |
|
||||
| -------- | ----------- | ---- |
|
||||
| validateMessages | Default validate message. And its format is similar with [newMessages](https://github.com/yiminghe/async-validator/blob/master/src/messages.js)'s returned value | Object { [nested.path]: String } |
|
||||
| mapPropsToFields | Convert props to field value(e.g. reading the values from Redux store). And you must mark returned fields with [`Form.createFormField`](#Form.createFormField) | (props) => Object{ fieldName: FormField { value } } |
|
||||
| validateMessages | Default validate message. And its format is similar with [newMessages](https://github.com/yiminghe/async-validator/blob/master/src/messages.js)'s returned value | Object { [nested.path]: String } |
|
||||
| onFieldsChange | Specify a function that will be called when the value a `Form.Item` gets changed. Usage example: saving the field's value to Redux store. | Function(props, fields) |
|
||||
| onValuesChange | A handler while value of any field is changed | (props, values) => void |
|
||||
|
||||
|
@ -55,8 +55,8 @@ CustomizedForm = Form.create({})(CustomizedForm);
|
||||
|
||||
| 参数 | 说明 | 类型 |
|
||||
| --- | --- | --- |
|
||||
| validateMessages | 默认校验信息,可用于把默认错误信息改为中文等,格式与 [newMessages](https://github.com/yiminghe/async-validator/blob/master/src/messages.js) 返回值一致 | Object { [nested.path]: String } |
|
||||
| mapPropsToFields | 把父组件的属性映射到表单项上(如:把 Redux store 中的值读出),需要对返回值中的表单域数据用 [`Form.createFormField`](#Form.createFormField) 标记 | (props) => Object{ fieldName: FormField { value } } |
|
||||
| validateMessages | 默认校验信息,可用于把默认错误信息改为中文等,格式与 [newMessages](https://github.com/yiminghe/async-validator/blob/master/src/messages.js) 返回值一致 | Object { [nested.path]: String } |
|
||||
| onFieldsChange | 当 `Form.Item` 子节点的值发生改变时触发,可以把对应的值转存到 Redux store | Function(props, fields) |
|
||||
| onValuesChange | 任一表单域的值发生改变时的回调 | (props, values) => void |
|
||||
|
||||
|
@ -31,5 +31,5 @@ When a numeric value needs to be provided.
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
| focus() | get focus |
|
||||
|
@ -33,6 +33,6 @@ title: InputNumber
|
||||
## 方法
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| --- | --- |
|
||||
| blur() | 移除焦点 |
|
||||
| focus() | 获取焦点 |
|
||||
|
@ -31,9 +31,9 @@ A list can be used to display content related to a single subject. The content c
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| size | Size of list | `default` \| `middle` \| `small` | `default` |
|
||||
| column | column of grid | number | - |
|
||||
| gutter | spacing between grid | number | 0 |
|
||||
| size | Size of list | `default` \| `middle` \| `small` | `default` |
|
||||
| xs | `<576px` column of grid | number | - |
|
||||
| sm | `≥576px` column of grid | number | - |
|
||||
| md | `≥768px` column of grid | number | - |
|
||||
|
@ -18,15 +18,15 @@ cols: 1
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| size | list 的尺寸 | `default` \| `middle` \| `small` | `default` |
|
||||
| bordered | 是否展示边框 | boolean | false |
|
||||
| footer | 列表底部 | string\|ReactNode | - |
|
||||
| grid | 列表栅格配置 | object | - |
|
||||
| header | 列表头部 | string\|ReactNode | - |
|
||||
| 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](https://ant.design/components/spin-cn/#API) ([更多](https://github.com/ant-design/ant-design/issues/8659)) | false |
|
||||
| loadMore | 加载更多 | string\|ReactNode | - |
|
||||
| pagination | 对应的 `pagination` 配置, 设置 `false` 不显示 | boolean\|object | false |
|
||||
| size | list 的尺寸 | `default` \| `middle` \| `small` | `default` |
|
||||
| split | 是否展示分割线 | boolean | true |
|
||||
|
||||
### List grid props
|
||||
|
@ -55,8 +55,8 @@ When need to mention someone or something.
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
| focus() | get focus |
|
||||
|
||||
### Nav
|
||||
|
||||
|
@ -55,9 +55,9 @@ title: Mention
|
||||
### Mention 方法
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| --- | --- |
|
||||
| blur() | 移除焦点 |
|
||||
| focus() | 获取焦点 |
|
||||
|
||||
### Nav
|
||||
|
||||
|
@ -30,6 +30,7 @@ More layouts with navigation: [layout](/components/layout).
|
||||
| ----- | ----------- | ---- | ------------- |
|
||||
| defaultOpenKeys | array with the keys of default opened sub menus | | |
|
||||
| defaultSelectedKeys | array with the keys of default selected menu items | string\[] | |
|
||||
| forceSubMenuRender | render submenu into DOM before it shows | boolean | false |
|
||||
| inlineCollapsed | specifies the collapsed status when menu is inline mode | boolean | - |
|
||||
| inlineIndent | indent px of inline menu item on each level | number | 24 |
|
||||
| mode | type of the menu; `vertical`, `horizontal`, and `inline` modes are supported | string: `vertical` \| `vertical-right` \| `horizontal` \| `inline` | `vertical` |
|
||||
@ -38,14 +39,13 @@ More layouts with navigation: [layout](/components/layout).
|
||||
| selectable | allow selecting menu items | boolean | true |
|
||||
| selectedKeys | array with the keys of currently selected menu items | string\[] | |
|
||||
| style | style of the root node | object | |
|
||||
| subMenuCloseDelay | delay time to hide submenu when mouse leave, unit: second | number | 0.1 |
|
||||
| subMenuOpenDelay | delay time to show submenu when mouse enter, unit: second | number | 0 |
|
||||
| theme | color theme of the menu | string: `light` `dark` | `light` |
|
||||
| onClick | callback executed when a menu item is clicked | function({ item, key, keyPath }) | - |
|
||||
| onDeselect | callback executed when a menu item is deselected, only supported for multiple mode | function({ item, key, selectedKeys }) | - |
|
||||
| onOpenChange | called when open/close sub menu | function(openKeys: string\[]) | noop |
|
||||
| onSelect | callback executed when a menu item is selected | function({ item, key, selectedKeys }) | none |
|
||||
| subMenuOpenDelay | delay time to show submenu when mouse enter, unit: second | number | 0 |
|
||||
| subMenuCloseDelay | delay time to hide submenu when mouse leave, unit: second | number | 0.1 |
|
||||
| forceSubMenuRender | render submenu into DOM before it shows | boolean | false |
|
||||
|
||||
> More options in [rc-menu](https://github.com/react-component/menu#api)
|
||||
|
||||
|
@ -31,6 +31,7 @@ subtitle: 导航菜单
|
||||
| --- | --- | --- | --- |
|
||||
| defaultOpenKeys | 初始展开的 SubMenu 菜单项 key 数组 | | |
|
||||
| defaultSelectedKeys | 初始选中的菜单项 key 数组 | string\[] | |
|
||||
| forceSubMenuRender | 在子菜单展示之前就渲染进 DOM | boolean | false |
|
||||
| inlineCollapsed | inline 时菜单是否收起状态 | boolean | - |
|
||||
| inlineIndent | inline 模式的菜单缩进宽度 | number | 24 |
|
||||
| mode | 菜单类型,现在支持垂直、水平、和内嵌模式三种 | string: `vertical` `vertical-right` `horizontal` `inline` | `vertical` |
|
||||
@ -39,14 +40,13 @@ subtitle: 导航菜单
|
||||
| selectable | 是否允许选中 | boolean | true |
|
||||
| selectedKeys | 当前选中的菜单项 key 数组 | string\[] | |
|
||||
| style | 根节点样式 | object | |
|
||||
| subMenuCloseDelay | 用户鼠标离开子菜单后关闭延时,单位:秒 | number | 0.1 |
|
||||
| subMenuOpenDelay | 用户鼠标进入子菜单后开启延时,单位:秒 | number | 0 |
|
||||
| theme | 主题颜色 | string: `light` `dark` | `light` |
|
||||
| onClick | 点击 MenuItem 调用此函数 | function({ item, key, keyPath }) | - |
|
||||
| onDeselect | 取消选中时调用,仅在 multiple 生效 | function({ item, key, selectedKeys }) | - |
|
||||
| onOpenChange | SubMenu 展开/关闭的回调 | function(openKeys: string\[]) | noop |
|
||||
| onSelect | 被选中时调用 | function({ item, key, selectedKeys }) | 无 |
|
||||
| subMenuOpenDelay | 用户鼠标进入子菜单后开启延时,单位:秒 | number | 0 |
|
||||
| subMenuCloseDelay | 用户鼠标离开子菜单后关闭延时,单位:秒 | number | 0.1 |
|
||||
| forceSubMenuRender | 在子菜单展示之前就渲染进 DOM | boolean | false |
|
||||
|
||||
> More options in [rc-menu](https://github.com/react-component/menu#api)
|
||||
|
||||
|
@ -37,14 +37,12 @@ and so on.
|
||||
| width | Width of the modal dialog | string\|number | 520 |
|
||||
| wrapClassName | The class name of the container of the modal dialog | string | - |
|
||||
| zIndex | The `z-index` of the Modal | Number | 1000 |
|
||||
| onCancel | Specify a function that will be called when a user clicks mask, close button on top right or Cancel button |
|
||||
function(e) | - |
|
||||
| onCancel | Specify a function that will be called when a user clicks mask, close button on top right or Cancel button | function(e) | - |
|
||||
| onOk | Specify a function that will be called when a user clicks the OK button | function(e) | - |
|
||||
|
||||
#### Note
|
||||
|
||||
> The state of Modal will be preserved at it's component lifecycle by default, if you wish to open it with a brand new state everytime, set `destroyOnClose` on it.
|
||||
|
||||
> The state of Modal will be preserved at it's component lifecycle by default, if you wish to open it with a brand new state everytime, set `destroyOnClose` on it.
|
||||
|
||||
### Modal.method()
|
||||
|
||||
|
@ -23,10 +23,10 @@ A long list can be divided into several pages by `Pagination`, and only one page
|
||||
| current | current page number | number | - |
|
||||
| defaultCurrent | default initial page number | number | 1 |
|
||||
| defaultPageSize | default number of data items per page | number | 10 |
|
||||
| hideOnSinglePage | Whether to hide pager on single page | boolean | false |
|
||||
| itemRender | to customize item innerHTML | (page, type: 'page' \| 'prev' \| 'next', originalElement) => React.ReactNode | - |
|
||||
| pageSize | number of data items per page | number | - |
|
||||
| pageSizeOptions | specify the sizeChanger options | string\[] | ['10', '20', '30', '40'] |
|
||||
| hideOnSinglePage | Whether to hide pager on single page | boolean | false |
|
||||
| showQuickJumper | determine whether you can jump to pages directly | boolean | false |
|
||||
| showSizeChanger | determine whether `pageSize` can be changed | boolean | false |
|
||||
| showTotal | to display the total number and range | Function(total, range) | - |
|
||||
|
@ -24,10 +24,10 @@ cols: 1
|
||||
| current | 当前页数 | number | - |
|
||||
| defaultCurrent | 默认的当前页数 | number | 1 |
|
||||
| defaultPageSize | 默认的每页条数 | number | 10 |
|
||||
| hideOnSinglePage | 只有一页时是否隐藏分页器 | boolean | false |
|
||||
| itemRender | 用于自定义页码的结构,可用于优化 SEO | (page, type: 'page' \| 'prev' \| 'next', originalElement) => React.ReactNode | - |
|
||||
| pageSize | 每页条数 | number | - |
|
||||
| pageSizeOptions | 指定每页可以显示多少条 | string\[] | ['10', '20', '30', '40'] |
|
||||
| hideOnSinglePage | 只有一页时是否隐藏分页器 | boolean | false |
|
||||
| showQuickJumper | 是否可以快速跳转至某页 | boolean | false |
|
||||
| showSizeChanger | 是否可以改变 pageSize | boolean | false |
|
||||
| showTotal | 用于显示数据总量和当前数据顺序 | Function(total, range) | - |
|
||||
|
@ -17,7 +17,7 @@ Radio.
|
||||
|
||||
| Property | Description | Type | optional | Default |
|
||||
| -------- | ----------- | ---- | -------- | ------- |
|
||||
| autoFocus | get focus when component mounted | boolean | false |
|
||||
| autoFocus | get focus when component mounted | boolean | false | |
|
||||
| checked | Specifies whether the radio is selected. | boolean | | false |
|
||||
| defaultChecked | Specifies the initial state: whether or not the radio is selected. | boolean | | false |
|
||||
| disabled | Disable radio | boolean | | false |
|
||||
@ -43,5 +43,5 @@ radio group,wrap a group of `Radio`。
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
| focus() | get focus |
|
||||
|
@ -17,7 +17,7 @@ title: Radio
|
||||
### Radio
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| --- | --- | --- | --- |
|
||||
| autoFocus | 自动获取焦点 | boolean | false |
|
||||
| checked | 指定当前是否选中 | boolean | false |
|
||||
| defaultChecked | 初始是否选中 | boolean | false |
|
||||
@ -27,8 +27,8 @@ title: Radio
|
||||
|
||||
单选框组合,用于包裹一组 `Radio`。
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| defaultValue | 默认选中的值 | any | 无 |
|
||||
| name | RadioGroup 下所有 `input[type="radio"]` 的 `name` 属性 | string | 无 |
|
||||
| options | 以配置形式设置子元素 | string\[] \| Array<{ label: string value: string disabled?: boolean }> | 无 |
|
||||
@ -41,6 +41,6 @@ title: Radio
|
||||
### Radio
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| --- | --- |
|
||||
| blur() | 移除焦点 |
|
||||
| focus() | 获取焦点 |
|
||||
|
@ -15,8 +15,8 @@ Rate component.
|
||||
|
||||
| Property | Description | type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| allowHalf | whether to allow semi selection | boolean | false |
|
||||
| allowClear | whether to allow clear when click again | boolean | true |
|
||||
| allowHalf | whether to allow semi selection | boolean | false |
|
||||
| autoFocus | get focus when component mounted | boolean | false |
|
||||
| character | custom character of rate | ReactNode | `<Icon type="star" />` |
|
||||
| className | custom class name of rate | string | - |
|
||||
@ -35,5 +35,5 @@ Rate component.
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
| focus() | get focus |
|
||||
|
@ -16,8 +16,8 @@ title: Rate
|
||||
|
||||
| 属性 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| allowHalf | 是否允许半选 | boolean | false |
|
||||
| allowClear | 是否允许再次点击后清除 | boolean | true |
|
||||
| allowHalf | 是否允许半选 | boolean | false |
|
||||
| autoFocus | 自动获取焦点 | boolean | false |
|
||||
| character | 自定义字符 | ReactNode | `<Icon type="star" />` |
|
||||
| className | 自定义样式类名 | string | - |
|
||||
@ -35,6 +35,6 @@ title: Rate
|
||||
## 方法
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| --- | --- |
|
||||
| blur() | 移除焦点 |
|
||||
| focus() | 获取焦点 |
|
||||
|
@ -35,7 +35,7 @@ Select component to select value from options.
|
||||
| firstActiveValue | Value of action option by default | string\|string\[] | - |
|
||||
| getPopupContainer | Parent Node which the selector should be rendered to. Default to `body`. When position issues happen, try to modify it into scrollable content and position it relative. [Example](https://codesandbox.io/s/4j168r7jw01) | function(triggerNode) | () => document.body |
|
||||
| labelInValue | whether to embed label in value, turn the format of value from `string` to `{key: string, label: ReactNode}` | boolean | false |
|
||||
| maxTagCount | Max tag count to show | number | - |
|
||||
| maxTagCount | Max tag count to show | number | - |
|
||||
| maxTagPlaceholder | Placeholder for not showing tags | ReactNode/function(omittedValues) | - |
|
||||
| mode | Set mode of Select (Support after 2.9) | 'multiple' \| 'tags' \| 'combobox' | - |
|
||||
| notFoundContent | Specify content to show when no result matches.. | string | 'Not Found' |
|
||||
@ -50,9 +50,9 @@ Select component to select value from options.
|
||||
| onChange | Called when select an option or input value change, or value of input is changed in combobox mode | function(value, label) | - |
|
||||
| onDeselect | Called when a option is deselected, the params are option's value (or key) . only called for multiple or tags, effective in multiple or tags mode only. | function(value) | - |
|
||||
| onFocus | Called when focus | function | - |
|
||||
| onInputKeyDown | Called when key pressed | function | - |
|
||||
| onMouseEnter | Called when mouse enter | function | - |
|
||||
| onMouseLeave | Called when mouse leave | function | - |
|
||||
| onInputKeyDown | Called when key pressed | function | - |
|
||||
| onPopupScroll | Called when dropdown scrolls | function | - |
|
||||
| onSearch | Callback function that is fired when input changed. | function(value: string) | |
|
||||
| onSelect | Called when a option is selected, the params are option's value (or key) and option instance. | function(value, option) | - |
|
||||
@ -60,7 +60,7 @@ Select component to select value from options.
|
||||
### Select Methods
|
||||
|
||||
| Name | Description |
|
||||
| --- | --- |
|
||||
| ---- | ----------- |
|
||||
| blur() | Remove focus |
|
||||
| focus() | Get focus |
|
||||
|
||||
|
@ -34,5 +34,5 @@ To input a value in a range.
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
| focus() | get focus |
|
||||
|
@ -34,6 +34,6 @@ title: Slider
|
||||
## 方法
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| --- | --- |
|
||||
| blur() | 移除焦点 |
|
||||
| focus() | 获取焦点 |
|
||||
|
@ -20,14 +20,14 @@ Switching Selector.
|
||||
| checkedChildren | content to be shown when the state is checked | string\|ReactNode | |
|
||||
| defaultChecked | to set the initial state | boolean | false |
|
||||
| disabled | Disable switch | boolean | false |
|
||||
| loading | loading state of switch | boolean | false |
|
||||
| size | the size of the `Switch`, options: `default` `small` | string | default |
|
||||
| unCheckedChildren | content to be shown when the state is unchecked | string\|ReactNode | |
|
||||
| onChange | a callback function, can be executed when the checked state is changing | Function(checked:Boolean) | |
|
||||
| loading | loading state of switch | boolean | false |
|
||||
|
||||
## Methods
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
| focus() | get focus |
|
||||
|
@ -20,14 +20,14 @@ title: Switch
|
||||
| checked | 指定当前是否选中 | boolean | false |
|
||||
| checkedChildren | 选中时的内容 | string\|ReactNode | |
|
||||
| defaultChecked | 初始是否选中 | boolean | false |
|
||||
| loading | 加载中的开关 | boolean | false |
|
||||
| size | 开关大小,可选值:`default` `small` | string | default |
|
||||
| unCheckedChildren | 非选中时的内容 | string\|ReactNode | |
|
||||
| onChange | 变化时回调函数 | Function(checked:Boolean) | |
|
||||
| loading | 加载中的开关 | boolean | false |
|
||||
|
||||
## 方法
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| --- | --- |
|
||||
| blur() | 移除焦点 |
|
||||
| focus() | 获取焦点 |
|
||||
|
@ -53,8 +53,8 @@ const columns = [{
|
||||
| Property | Description | Type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| bordered | Whether to show all table borders | boolean | `false` |
|
||||
| components | Override default table elements | object | - |
|
||||
| columns | Columns of table | [ColumnProps](https://git.io/vMMXC)\[] | - |
|
||||
| components | Override default table elements | object | - |
|
||||
| dataSource | Data record array to be displayed | any\[] | - |
|
||||
| defaultExpandAllRows | Expand all rows initially | boolean | `false` |
|
||||
| defaultExpandedRowKeys | Initial expanded row keys | string\[] | - |
|
||||
@ -88,6 +88,7 @@ One of the Table `columns` prop for describing the table's columns, Column has t
|
||||
| className | className of this column | string | - |
|
||||
| colSpan | Span of this column's title | number | |
|
||||
| dataIndex | Display field of the data record, could be set like `a.b.c` | string | - |
|
||||
| defaultSortOrder | Default order of sorted values: `'ascend'` `'descend'` `null` | string | - |
|
||||
| filterDropdown | Customized filter overlay | ReactNode | - |
|
||||
| filterDropdownVisible | Whether `filterDropdown` is visible | boolean | - |
|
||||
| filtered | Whether the `dataSource` is filtered | boolean | `false` |
|
||||
@ -100,7 +101,6 @@ One of the Table `columns` prop for describing the table's columns, Column has t
|
||||
| render | Renderer of the table cell. The return value should be a ReactNode, or an object for [colSpan/rowSpan config](#components-table-demo-colspan-rowspan) | Function(text, record, index) {} | - |
|
||||
| sorter | Sort function for local sort, see [Array.sort](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)'s compareFunction. If you need sort buttons only, set to `true` | Function\|boolean | - |
|
||||
| sortOrder | Order of sorted values: `'ascend'` `'descend'` `false` | boolean\|string | - |
|
||||
| defaultSortOrder | Default order of sorted values: `'ascend'` `'descend'` `null` | string | - |
|
||||
| title | Title of this column | string\|ReactNode | - |
|
||||
| width | Width of this column | string\|number | - |
|
||||
| onCell | Set props on per cell | Function(record) | - |
|
||||
@ -120,8 +120,8 @@ Properties for row selection.
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| getCheckboxProps | Get Checkbox or Radio props | Function(record) | - |
|
||||
| fixed | Fixed selection column on the left | boolean | - |
|
||||
| getCheckboxProps | Get Checkbox or Radio props | Function(record) | - |
|
||||
| hideDefaultSelections | Remove the default `Select All` and `Select Invert` selections | boolean | `false` |
|
||||
| selectedRowKeys | Controlled selected row keys | string\[] | \[] |
|
||||
| selections | Custom selection [config](#rowSelection), only displays default selections when set to `true` | object\[]\|boolean | - |
|
||||
|
@ -120,8 +120,8 @@ const columns = [{
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| getCheckboxProps | 选择框的默认属性配置 | Function(record) | - |
|
||||
| fixed | 把选择框列固定在左边 | boolean | - |
|
||||
| getCheckboxProps | 选择框的默认属性配置 | Function(record) | - |
|
||||
| hideDefaultSelections | 去掉『全选』『反选』两个默认选项 | boolean | false |
|
||||
| selectedRowKeys | 指定选中项的 key 数组,需要和 onChange 进行配合 | string\[] | \[] |
|
||||
| selections | 自定义选择项 [配置项](#selection), 设为 `true` 时使用默认选择项 | object\[]\|boolean | true |
|
||||
|
@ -37,22 +37,22 @@ import moment from 'moment';
|
||||
| format | to set the time format | string | "HH:mm:ss" |
|
||||
| getPopupContainer | to set the container of the floating layer, while the default is to create a div element in body | function(trigger) | - |
|
||||
| hideDisabledOptions | hide the options that can not be selected | boolean | false |
|
||||
| hourStep | interval between hours in picker | number | 1 |
|
||||
| minuteStep | interval between minutes in picker | number | 1 |
|
||||
| open | whether to popup panel | boolean | false |
|
||||
| placeholder | display when there's no value | string | "Select a time" |
|
||||
| popupClassName | className of panel | string | '' |
|
||||
| secondStep | interval between seconds in picker | number | 1 |
|
||||
| use12Hours | display as 12 hours format, with default format `h:mm:ss a` | boolean | false |
|
||||
| value | to set time | [moment](http://momentjs.com/) | - |
|
||||
| onChange | a callback function, can be executed when the selected time is changing | function(time: moment, timeString: string): void | - |
|
||||
| onOpenChange | a callback function which will be called while panel opening/closing | (open: boolean): void | - |
|
||||
| hourStep | interval between hours in picker | number | 1 |
|
||||
| minuteStep | interval between minutes in picker | number | 1 |
|
||||
| secondStep | interval between seconds in picker | number | 1 |
|
||||
|
||||
## Methods
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
| focus() | get focus |
|
||||
|
||||
<style>.code-box-demo .ant-time-picker { margin: 0 8px 12px 0; }</style>
|
||||
|
@ -38,22 +38,22 @@ import moment from 'moment';
|
||||
| format | 展示的时间格式 | string | "HH:mm:ss" |
|
||||
| getPopupContainer | 定义浮层的容器,默认为 body 上新建 div | function(trigger) | 无 |
|
||||
| hideDisabledOptions | 隐藏禁止选择的选项 | boolean | false |
|
||||
| hourStep | 小时选项间隔 | number | 1 |
|
||||
| minuteStep | 分钟选项间隔 | number | 1 |
|
||||
| open | 面板是否打开 | boolean | false |
|
||||
| placeholder | 没有值的时候显示的内容 | string | "请选择时间" |
|
||||
| popupClassName | 弹出层类名 | string | '' |
|
||||
| secondStep | 秒选项间隔 | number | 1 |
|
||||
| use12Hours | 使用 12 小时制,为 true 时 `format` 默认为 `h:mm:ss a` | boolean | false |
|
||||
| value | 当前时间 | [moment](http://momentjs.com/) | 无 |
|
||||
| onChange | 时间发生变化的回调 | function(time: moment, timeString: string): void | 无 |
|
||||
| onOpenChange | 面板打开/关闭时的回调 | (open: boolean): void | 无 |
|
||||
| hourStep | 小时选项间隔 | number | 1 |
|
||||
| minuteStep | 分钟选项间隔 | number | 1 |
|
||||
| secondStep | 秒选项间隔 | number | 1 |
|
||||
|
||||
## 方法
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| --- | --- |
|
||||
| blur() | 移除焦点 |
|
||||
| focus() | 获取焦点 |
|
||||
|
||||
<style>.code-box-demo .ant-time-picker { margin: 0 8px 12px 0; }</style>
|
||||
|
@ -25,6 +25,7 @@ The following APIs are shared by Tooltip, Popconfirm, Popover.
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| arrowPointAtCenter | Whether the arrow is pointed at the center of target, supported after `antd@1.11+` | boolean | `false` |
|
||||
| autoAdjustOverflow | Whether to adjust popup placement automatically when popup is off screen | boolean | `true` |
|
||||
| defaultVisible | Whether the floating tooltip card is visible by default | boolean | `false` |
|
||||
| getPopupContainer | The DOM container of the tip, the default behavior is to create a `div` element in `body`. Use `getTooltipContainer` if you are using `antd@<2.5.2` | Function(triggerNode) | () => document.body |
|
||||
| mouseEnterDelay | Delay in seconds, before tooltip is shown on mouse enter | number | 0 |
|
||||
| mouseLeaveDelay | Delay in seconds, before tooltip is hidden on mouse leave | number | 0.1 |
|
||||
@ -32,7 +33,6 @@ The following APIs are shared by Tooltip, Popconfirm, Popover.
|
||||
| overlayStyle | Style of the tooltip card | object | - |
|
||||
| placement | The position of the tooltip relative to the target, which can be one of `top` `left` `right` `bottom` `topLeft` `topRight` `bottomLeft` `bottomRight` `leftTop` `leftBottom` `rightTop` `rightBottom` | string | `top` |
|
||||
| trigger | Tooltip trigger mode | `hover` \| `focus` \| `click` | `hover` |
|
||||
| defaultVisible | Whether the floating tooltip card is visible by default | boolean | `false` |
|
||||
| visible | Whether the floating tooltip card is visible or not | boolean | `false` |
|
||||
| onVisibleChange | Callback executed when visibility of the tooltip card is changed | (visible) => void | - |
|
||||
|
||||
|
@ -27,6 +27,7 @@ title: Tooltip
|
||||
| --- | --- | --- | --- |
|
||||
| arrowPointAtCenter | 箭头是否指向目标元素中心,`antd@1.11+` 支持 | boolean | `false` |
|
||||
| autoAdjustOverflow | 气泡被遮挡时自动调整位置 | boolean | `true` |
|
||||
| defaultVisible | 默认是否显隐 | boolean | false |
|
||||
| getPopupContainer | 浮层渲染父节点,默认渲染到 body 上。`2.5.2` 之前请使用 `getTooltipContainer` | Function(triggerNode) | () => document.body |
|
||||
| mouseEnterDelay | 鼠标移入后延时多少才显示 Tooltip,单位:秒 | number | 0 |
|
||||
| mouseLeaveDelay | 鼠标移出后延时多少才隐藏 Tooltip,单位:秒 | number | 0.1 |
|
||||
@ -34,7 +35,6 @@ title: Tooltip
|
||||
| overlayStyle | 卡片样式 | object | 无 |
|
||||
| placement | 气泡框位置,可选 `top` `left` `right` `bottom` `topLeft` `topRight` `bottomLeft` `bottomRight` `leftTop` `leftBottom` `rightTop` `rightBottom` | string | top |
|
||||
| trigger | 触发行为,可选 `hover/focus/click` | string | hover |
|
||||
| defaultVisible | 默认是否显隐 | boolean | false |
|
||||
| visible | 用于手动控制浮层显隐 | boolean | false |
|
||||
| onVisibleChange | 显示隐藏的回调 | (visible) => void | 无 |
|
||||
|
||||
|
@ -49,8 +49,8 @@ Any data whose entries are defined in a hierarchical manner is fit to use this c
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
| focus() | get focus |
|
||||
|
||||
### TreeNode props
|
||||
|
||||
|
@ -48,9 +48,9 @@ title: TreeSelect
|
||||
### Tree 方法
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| --- | --- |
|
||||
| blur() | 移除焦点 |
|
||||
| focus() | 获取焦点 |
|
||||
|
||||
### TreeNode props
|
||||
|
||||
|
@ -47,9 +47,9 @@ Almost anything can be represented in a tree structure. Examples include directo
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| disableCheckbox | Disables the checkbox of the treeNode | boolean | false |
|
||||
| disabled | Disables the treeNode | boolean | false |
|
||||
| selectable | Set whether the treeNode can be selected | boolean | true |
|
||||
| isLeaf | Determines if this is a leaf node(effective when `loadData` is specified) | boolean | false |
|
||||
| key | Used with (default)ExpandedKeys / (default)CheckedKeys / (default)SelectedKeys. P.S.: It must be unique in all of treeNodes of the tree! | string | internal calculated position of treeNode |
|
||||
| selectable | Set whether the treeNode can be selected | boolean | true |
|
||||
| title | Title | string\|ReactNode | '---' |
|
||||
|
||||
## Note
|
||||
|
@ -48,9 +48,9 @@ subtitle: 树形控件
|
||||
| --- | --- | --- | --- |
|
||||
| disableCheckbox | 禁掉 checkbox | boolean | false |
|
||||
| disabled | 禁掉响应 | boolean | false |
|
||||
| selectable | 设置节点是否可被选中 | boolean | true |
|
||||
| isLeaf | 设置为叶子节点(设置了`loadData`时有效) | boolean | false |
|
||||
| key | 被树的 (default)ExpandedKeys / (default)CheckedKeys / (default)SelectedKeys 属性所用。注意:整个树范围内的所有节点的 key 值不能重复! | string | 内部计算出的节点位置 |
|
||||
| selectable | 设置节点是否可被选中 | boolean | true |
|
||||
| title | 标题 | string\|ReactNode | '---' |
|
||||
|
||||
## 注意
|
||||
|
Loading…
Reference in New Issue
Block a user