mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
parent
25f51cdd64
commit
d2dc88c470
@ -21,6 +21,7 @@ const dataSource = ['12345', '23456', '34567'];
|
||||
| Property | Description | Type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| allowClear | Show clear button, effective in multiple mode only. | boolean | false |
|
||||
| autoFocus | get focus when component mounted | boolean | false |
|
||||
| backfill | backfill selected item the input when using keyboard | boolean | false |
|
||||
| children (for customize input element) | customize input element | HTMLInputElement / HTMLTextAreaElement / React.ReactElement<InputProps> | `<Input />` |
|
||||
| children (for dataSource) | Data source for autocomplet | React.ReactElement<OptionProps> / Array<React.ReactElement<OptionProps>> | - |
|
||||
@ -35,3 +36,10 @@ const dataSource = ['12345', '23456', '34567'];
|
||||
| onChange | Called when select an option or input value change, or value of input is changed | function(value, label) | - |
|
||||
| onSearch | Called when searching items. | function(value) | - |
|
||||
| onSelect | Called when a option is selected. param is option's value and option instance. | function(value, option) | - |
|
||||
|
||||
## Methods
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
|
@ -22,6 +22,7 @@ const dataSource = ['12345', '23456', '34567'];
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| allowClear | 支持清除, 单选模式有效 | boolean | false |
|
||||
| autoFocus | 自动获取焦点 | boolean | false |
|
||||
| backfill | 使用键盘选择选项的时候把选中项回填到输入框中 | boolean | false |
|
||||
| children (自动完成的数据源) | 自动完成的数据源 | React.ReactElement<OptionProps> / Array<React.ReactElement<OptionProps>> | - |
|
||||
| children (自定义输入框) | 自定义输入框 | HTMLInputElement / HTMLTextAreaElement / React.ReactElement<InputProps> | `<Input />` |
|
||||
@ -36,3 +37,10 @@ const dataSource = ['12345', '23456', '34567'];
|
||||
| onChange | 选中 option,或 input 的 value 变化时,调用此函数 | function(value) | 无 |
|
||||
| onSearch | 搜索补全项的时候调用 | function(value) | 无 |
|
||||
| onSelect | 被选中时调用,参数为选中项的 value 值 | function(value, option) | 无 |
|
||||
|
||||
## 方法
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| blur() | 移除焦点 |
|
||||
|
@ -21,6 +21,7 @@ Cascade selection box.
|
||||
| Property | Description | Type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| allowClear | whether allow clear | boolean | true |
|
||||
| autoFocus | get focus when component mounted | boolean | false |
|
||||
| changeOnSelect | change value on each selection if set to true, see above demo for details | boolean | false |
|
||||
| className | additional css class | string | - |
|
||||
| defaultValue | initial selected value | string\[] | \[] |
|
||||
@ -51,6 +52,13 @@ Fields in `showSearch`:
|
||||
| render | Used to render filtered options. | `function(inputValue, path): ReactNode` | |
|
||||
| sort | Used to sort filtered options. | `function(a, b, inputValue)` | |
|
||||
|
||||
## Methods
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
|
||||
<style>
|
||||
.ant-cascader-picker {
|
||||
width: 300px;
|
||||
|
@ -22,6 +22,7 @@ subtitle: 级联选择
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| allowClear | 是否支持清除 | boolean | true |
|
||||
| autoFocus | 自动获取焦点 | boolean | false |
|
||||
| changeOnSelect | 当此项为 true 时,点选每级菜单选项值都会发生变化,具体见上面的演示 | boolean | false |
|
||||
| className | 自定义类名 | string | - |
|
||||
| defaultValue | 默认的选中项 | string\[] | \[] |
|
||||
@ -52,6 +53,13 @@ subtitle: 级联选择
|
||||
| render | 用于渲染 filter 后的选项 | `function(inputValue, path): ReactNode` | |
|
||||
| sort | 用于排序 filter 后的选项 | `function(a, b, inputValue)` | |
|
||||
|
||||
## 方法
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| blur() | 移除焦点 |
|
||||
|
||||
<style>
|
||||
.ant-cascader-picker {
|
||||
width: 300px;
|
||||
|
@ -17,6 +17,7 @@ Checkbox.
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| autoFocus | get focus when component mounted | boolean | false |
|
||||
| checked | Specifies whether the checkbox is selected. | boolean | false |
|
||||
| defaultChecked | Specifies the initial state: whether or not the checkbox is selected. | boolean | false |
|
||||
| disabled | Disable checkbox | boolean | false |
|
||||
@ -31,3 +32,12 @@ Checkbox.
|
||||
| options | Specifies options | string\[] | \[] |
|
||||
| value | Used for setting the currently selected value. | string\[] | \[] |
|
||||
| onChange | The callback function that is triggered when the state changes. | Function(checkedValue) | - |
|
||||
|
||||
## Methods
|
||||
|
||||
### Checkbox
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
|
@ -18,6 +18,7 @@ title: Checkbox
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| autoFocus | 自动获取焦点 | boolean | false |
|
||||
| checked | 指定当前是否选中 | boolean | false |
|
||||
| defaultChecked | 初始是否选中 | boolean | false |
|
||||
| indeterminate | 设置 indeterminate 状态,只负责样式控制 | boolean | false |
|
||||
@ -31,3 +32,12 @@ title: Checkbox
|
||||
| options | 指定可选项 | string\[] | \[] |
|
||||
| value | 指定选中的选项 | string\[] | \[] |
|
||||
| onChange | 变化时回调函数 | Function(checkedValue) | - |
|
||||
|
||||
## 方法
|
||||
|
||||
### Checkbox
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| blur() | 移除焦点 |
|
||||
|
@ -37,6 +37,7 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker, WeekPicke
|
||||
| Property | Description | Type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| allowClear | Whether to show clear button | boolean | true |
|
||||
| autoFocus | get focus when component mounted | boolean | false |
|
||||
| className | picker className | string | '' |
|
||||
| dateRender | custom rendering function for date cells | function(currentDate: moment, today: moment) => React.ReactNode | - |
|
||||
| disabled | determine whether the DatePicker is disabled | boolean | false |
|
||||
@ -50,6 +51,14 @@ 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 |
|
||||
|
||||
### DatePicker
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
|
@ -38,6 +38,7 @@ subtitle: 日期选择框
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| allowClear | 是否显示清除按钮 | boolean | true |
|
||||
| autoFocus | 自动获取焦点 | boolean | false |
|
||||
| className | 选择器 className | string | '' |
|
||||
| dateRender | 自定义日期单元格的内容 | function(currentDate: moment, today: moment) => React.ReactNode | - |
|
||||
| disabled | 禁用 | boolean | false |
|
||||
@ -51,6 +52,13 @@ subtitle: 日期选择框
|
||||
| style | 自定义输入框样式 | object | {} |
|
||||
| onOpenChange | 弹出日历和关闭日历的回调 | function(status) | 无 |
|
||||
|
||||
### 共同的方法
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| blur() | 移除焦点 |
|
||||
|
||||
### DatePicker
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
|
@ -14,6 +14,7 @@ When a numeric value needs to be provided.
|
||||
|
||||
| property | description | type | default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| autoFocus | get focus when component mounted | boolean | false |
|
||||
| defaultValue | initial value | number | |
|
||||
| disabled | disable the input | boolean | false |
|
||||
| formatter | Specifies the format of the value presented | function(value: number \| string): string | - |
|
||||
@ -25,3 +26,10 @@ When a numeric value needs to be provided.
|
||||
| step | The number to which the current value is increased or decreased. It can be an integer or decimal. | number\|string | 1 |
|
||||
| value | current value | number | |
|
||||
| onChange | The callback triggered when the value is changed. | function(value: number \| string) | |
|
||||
|
||||
## Methods
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
|
@ -17,6 +17,7 @@ title: InputNumber
|
||||
|
||||
| 成员 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| autoFocus | 自动获取焦点 | boolean | false |
|
||||
| defaultValue | 初始值 | number | |
|
||||
| disabled | 禁用 | boolean | false |
|
||||
| formatter | 指定输入框展示值的格式 | function(value: number \| string): string | - |
|
||||
@ -28,3 +29,10 @@ title: InputNumber
|
||||
| step | 每次改变步数,可以为小数 | number\|string | 1 |
|
||||
| value | 当前值 | number | |
|
||||
| onChange | 变化回调 | Function(value: number \| string) | |
|
||||
|
||||
## 方法
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| blur() | 移除焦点 |
|
||||
|
@ -31,6 +31,7 @@ When need to mention someone or something.
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| autoFocus | get focus when component mounted | boolean | false |
|
||||
| defaultValue | default value | ContentState, you can use `Mention.toContentState` to convert text to `ContentState` | null |
|
||||
| disabled | Tell if the input is disabled. | boolean | false |
|
||||
| getSuggestionContainer | rendered to the root of the menu. Default rendered to the body dom. If gets any problem of the menu while scrolling. Try to make the root the dom scrolled, and make it position relative. | function | () => document.body |
|
||||
@ -52,9 +53,10 @@ When need to mention someone or something.
|
||||
|
||||
### Mention methods
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| focus | Force focus back onto the editor node. | - | - |
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
|
||||
### Nav
|
||||
|
||||
|
@ -32,6 +32,7 @@ title: Mention
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| autoFocus | 自动获取焦点 | boolean | false |
|
||||
| defaultValue | 默认值 | ContentState, 可以用 `Mention.toContentState(text)` 把文字转换成 ContentState | null |
|
||||
| disabled | 是否禁用状态. | boolean | false |
|
||||
| getSuggestionContainer | 菜单渲染父节点。默认渲染到 body 上,如果你遇到菜单滚动定位问题,试试修改为滚动的区域,并相对其定位 | function() | () => document.body |
|
||||
@ -51,11 +52,12 @@ title: Mention
|
||||
| onSearchChange | 输入框中 @ 变化时回调 | function(value:string, trigger: string) | \[] |
|
||||
| onSelect | 下拉框选择建议时回调 | function(suggestion: string, data?: any) | null |
|
||||
|
||||
### Mention methods
|
||||
### Mention 方法
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| focus | 强制获得焦点. | - | - |
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| blur() | 移除焦点 |
|
||||
|
||||
### Nav
|
||||
|
||||
|
@ -17,6 +17,7 @@ Radio.
|
||||
|
||||
| Property | Description | Type | optional | Default |
|
||||
| -------- | ----------- | ---- | -------- | ------- |
|
||||
| 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 |
|
||||
@ -35,3 +36,12 @@ radio group,wrap a group of `Radio`。
|
||||
| size | Size, only on radio style | string | `large` `default` `small` | `default` |
|
||||
| value | Used for setting the currently selected value. | any | none | none |
|
||||
| onChange | The callback function that is triggered when the state changes. | Function(e:Event) | none | none |
|
||||
|
||||
## Methods
|
||||
|
||||
### Radio
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
|
@ -16,21 +16,31 @@ title: Radio
|
||||
|
||||
### Radio
|
||||
|
||||
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| checked | 指定当前是否选中 | boolean | | false |
|
||||
| defaultChecked | 初始是否选中 | boolean | | false |
|
||||
| value | 根据 value 进行比较,判断是否选中 | any | | 无 |
|
||||
| autoFocus | 自动获取焦点 | boolean | false |
|
||||
| checked | 指定当前是否选中 | boolean | false |
|
||||
| defaultChecked | 初始是否选中 | boolean | false |
|
||||
| value | 根据 value 进行比较,判断是否选中 | any | 无 |
|
||||
|
||||
### RadioGroup
|
||||
|
||||
单选框组合,用于包裹一组 `Radio`。
|
||||
|
||||
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| defaultValue | 默认选中的值 | any | 无 | 无 |
|
||||
| name | RadioGroup 下所有 `input[type="radio"]` 的 `name` 属性 | string | | 无 |
|
||||
| options | 以配置形式设置子元素 | string\[] \| Array<{ label: string value: string disabled?: boolean }> | 无 | 无 |
|
||||
| size | 大小,只对按钮样式生效 | string | `large` `default` `small` | `default` |
|
||||
| value | 用于设置当前选中的值 | any | 无 | 无 |
|
||||
| onChange | 选项变化时的回调函数 | Function(e:Event) | 无 | 无 |
|
||||
| defaultValue | 默认选中的值 | any | 无 |
|
||||
| name | RadioGroup 下所有 `input[type="radio"]` 的 `name` 属性 | string | 无 |
|
||||
| options | 以配置形式设置子元素 | string\[] \| Array<{ label: string value: string disabled?: boolean }> | 无 |
|
||||
| size | 大小,只对按钮样式生效 | `large` \| `default` \| `small` | `default` |
|
||||
| value | 用于设置当前选中的值 | any | 无 |
|
||||
| onChange | 选项变化时的回调函数 | Function(e:Event) | 无 |
|
||||
|
||||
## 方法
|
||||
|
||||
### Radio
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| blur() | 移除焦点 |
|
||||
|
@ -16,6 +16,7 @@ Rate component.
|
||||
| Property | Description | type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| 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 | - |
|
||||
| count | star count | number | 5 |
|
||||
@ -28,3 +29,10 @@ Rate component.
|
||||
| onFocus | callback when component get focus | Function() | - |
|
||||
| onHoverChange | callback when hover item | Function(value: number) | - |
|
||||
| onKeyDown | callback when keydown on component | Function(event) | - |
|
||||
|
||||
## Methods
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
|
@ -17,6 +17,7 @@ title: Rate
|
||||
| 属性 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| allowHalf | 是否允许半选 | boolean | false |
|
||||
| autoFocus | 自动获取焦点 | boolean | false |
|
||||
| character | 自定义字符 | ReactNode | `<Icon type="star" />` |
|
||||
| className | 自定义样式类名 | string | - |
|
||||
| count | star 总数 | number | 5 |
|
||||
@ -29,3 +30,10 @@ title: Rate
|
||||
| onFocus | 获取焦点时的回调 | Function() | - |
|
||||
| onHoverChange | 鼠标经过时数值变化的回调 | Function(value: number) | - |
|
||||
| onKeyDown | 按键回调 | Function(event) | - |
|
||||
|
||||
## 方法
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| blur() | 移除焦点 |
|
||||
|
@ -14,6 +14,7 @@ To input a value in a range.
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| autoFocus | get focus when component mounted | boolean | false |
|
||||
| defaultValue | The default value of slider. When `range` is `false`, use `number`, otherwise, use `[number, number]` | number\|number\[] | 0 or [0, 0] |
|
||||
| disabled | If true, the slider will not be interactable. | boolean | false |
|
||||
| dots | Whether the thumb can drag over tick only. | boolean | false |
|
||||
@ -28,3 +29,10 @@ To input a value in a range.
|
||||
| vertical | If true, the slider will be vertical. | Boolean | false |
|
||||
| onAfterChange | Fire when `onmouseup` is fired. | Function(value) | NOOP |
|
||||
| onChange | Callback function that is fired when the user changes the slider's value. | Function(value) | NOOP |
|
||||
|
||||
## Methods
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
|
@ -15,6 +15,7 @@ title: Slider
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| allowClear | 支持清除, 单选模式有效 | boolean | false |
|
||||
| defaultValue | 设置初始取值。当 `range` 为 `false` 时,使用 `number`,否则用 `[number, number]` | number\|number\[] | 0 or [0, 0] |
|
||||
| disabled | 值为 `true` 时,滑块为禁用状态 | boolean | false |
|
||||
| dots | 是否只能拖拽到刻度上 | boolean | false |
|
||||
@ -29,3 +30,10 @@ title: Slider
|
||||
| vertical | 值为 `true` 时,Slider 为垂直方向 | Boolean | false |
|
||||
| onAfterChange | 与 `onmouseup` 触发时机一致,把当前值作为参数传入。 | Function(value) | NOOP |
|
||||
| onChange | 当 Slider 的值发生改变时,会触发 onChange 事件,并把改变后的值作为参数传入。 | Function(value) | NOOP |
|
||||
|
||||
## 方法
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| blur() | 移除焦点 |
|
||||
|
@ -13,10 +13,9 @@ Switching Selector.
|
||||
|
||||
## API
|
||||
|
||||
### Switch
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| autoFocus | get focus when component mounted | boolean | false |
|
||||
| checked | determine whether the `Switch` is checked | boolean | false |
|
||||
| checkedChildren | content to be shown when the state is checked | string\|ReactNode | |
|
||||
| defaultChecked | to set the initial state | boolean | false |
|
||||
@ -24,3 +23,10 @@ Switching Selector.
|
||||
| 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) | |
|
||||
|
||||
## Methods
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
|
@ -14,13 +14,19 @@ title: Switch
|
||||
|
||||
## API
|
||||
|
||||
### Switch
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| allowClear | 支持清除, 单选模式有效 | boolean | false |
|
||||
| checked | 指定当前是否选中 | boolean | false |
|
||||
| checkedChildren | 选中时的内容 | string\|ReactNode | |
|
||||
| defaultChecked | 初始是否选中 | boolean | false |
|
||||
| size | 开关大小,可选值:`default` `small` | string | default |
|
||||
| unCheckedChildren | 非选中时的内容 | string\|ReactNode | |
|
||||
| onChange | 变化时回调函数 | Function(checked:Boolean) | |
|
||||
|
||||
## 方法
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| blur() | 移除焦点 |
|
||||
|
@ -25,6 +25,7 @@ import moment from 'moment';
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| addon | called from timepicker panel to render some addon to its bottom | function | - |
|
||||
| allowEmpty | allow clearing text | boolean | true |
|
||||
| autoFocus | get focus when component mounted | boolean | false |
|
||||
| className | className of picker | string | '' |
|
||||
| clearText | clear tooltip of icon | string | clear |
|
||||
| defaultOpenValue | default open panel value, used to set utcOffset,locale if value/defaultValue absent | [moment](http://momentjs.com/) | moment() |
|
||||
@ -47,4 +48,11 @@ import moment from 'moment';
|
||||
| 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 |
|
||||
|
||||
<style>.code-box-demo .ant-time-picker { margin: 0 8px 12px 0; }</style>
|
||||
|
@ -26,6 +26,7 @@ import moment from 'moment';
|
||||
| --- | --- | --- | --- |
|
||||
| addon | 选择框底部显示自定义的内容 | function | 无 |
|
||||
| allowEmpty | 是否展示清除按钮 | boolean | true |
|
||||
| autoFocus | 自动获取焦点 | boolean | false |
|
||||
| className | 选择器类名 | string | '' |
|
||||
| clearText | 清除按钮的提示文案 | string | clear |
|
||||
| defaultOpenValue | 当 defaultValue/value 不存在时,可以设置面板打开时默认选中的值 | [moment](http://momentjs.com/) | moment() |
|
||||
@ -48,4 +49,11 @@ import moment from 'moment';
|
||||
| minuteStep | 分钟选项间隔 | number | 1 |
|
||||
| secondStep | 秒选项间隔 | number | 1 |
|
||||
|
||||
## 方法
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| blur() | 移除焦点 |
|
||||
|
||||
<style>.code-box-demo .ant-time-picker { margin: 0 8px 12px 0; }</style>
|
||||
|
@ -45,6 +45,13 @@ Any data whose entries are defined in a hierarchical manner is fit to use this c
|
||||
| onSearch | A callback function, can be executed when the search input changes. | function(value: string) | - |
|
||||
| onSelect | A callback function, can be executed when you select a treeNode. | function(value, node, extra) | - |
|
||||
|
||||
### Tree Methods
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| focus() | get focus |
|
||||
| blur() | remove focus |
|
||||
|
||||
### TreeNode props
|
||||
|
||||
> We recommend you to use `treeData` rather than `TreeNode`, to avoid the trouble of manual construction.
|
||||
|
@ -45,6 +45,13 @@ title: TreeSelect
|
||||
| onSearch | 文本框值变化时回调 | function(value: string) | - |
|
||||
| onSelect | 被选中时调用 | function(value, node, extra) | - |
|
||||
|
||||
### Tree 方法
|
||||
|
||||
| 名称 | 描述 |
|
||||
| ---- | ----------- |
|
||||
| focus() | 获取焦点 |
|
||||
| blur() | 移除焦点 |
|
||||
|
||||
### TreeNode props
|
||||
|
||||
> 建议使用 treeData 来代替 TreeNode,免去手工构造麻烦
|
||||
|
Loading…
Reference in New Issue
Block a user