mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 11:10:01 +08:00
docs: fix size props (#21724)
This commit is contained in:
parent
dbc64339db
commit
f78332171e
@ -37,7 +37,7 @@ To get a customized button, just set `type`/`shape`/`size`/`loading`/`disabled`.
|
||||
| icon | set the icon component of button | ReactNode | - | |
|
||||
| loading | set the loading status of button | boolean \| { delay: number } | `false` | |
|
||||
| shape | can be set to `circle`, `round` or omitted | string | - | |
|
||||
| size | can be set to `small` `large` or omitted | string | `default` | |
|
||||
| size | set the size of button | `large` \| `middle` \| `small` | | |
|
||||
| target | same as target attribute of a, works when href is specified | string | - | |
|
||||
| type | can be set to `primary` `ghost` `dashed` `link` or omitted (meaning `default`) | string | `default` | |
|
||||
| onClick | set the handler to handle `click` event | (event) => void | - | |
|
||||
|
@ -40,7 +40,7 @@ subtitle: 按钮
|
||||
| icon | 设置按钮的图标组件 | ReactNode | - | |
|
||||
| loading | 设置按钮载入状态 | boolean \| { delay: number } | `false` | |
|
||||
| shape | 设置按钮形状,可选值为 `circle`、 `round` 或者不设 | string | - | |
|
||||
| size | 设置按钮大小,可选值为 `small` `large` 或者不设 | string | `default` | |
|
||||
| size | 设置按钮大小 | `large` \| `middle` \| `small` | 无 | |
|
||||
| target | 相当于 a 链接的 target 属性,href 存在时生效 | string | - | |
|
||||
| type | 设置按钮类型,可选值为 `primary` `dashed` `link` 或者不设 | string | - | |
|
||||
| onClick | 点击按钮时的回调 | (event) => void | - | |
|
||||
|
@ -39,7 +39,7 @@ Cascade selection box.
|
||||
| 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` | |
|
||||
| size | input size | `large` \| `middle` \| `small` | | |
|
||||
| style | additional style | string | - | |
|
||||
| suffixIcon | The custom suffix icon | ReactNode | - | |
|
||||
| value | selected value | string\[] | - | |
|
||||
|
@ -40,7 +40,7 @@ subtitle: 级联选择
|
||||
| popupPlacement | 浮层预设位置:`bottomLeft` `bottomRight` `topLeft` `topRight` | Enum | `bottomLeft` | |
|
||||
| popupVisible | 控制浮层显隐 | boolean | - | |
|
||||
| showSearch | 在选择框中显示搜索框 | boolean | false | |
|
||||
| size | 输入框大小,可选 `large` `default` `small` | string | `default` | |
|
||||
| size | 输入框大小 | `large` \| `middle` \| `small` | 无 | |
|
||||
| style | 自定义样式 | string | - | |
|
||||
| suffixIcon | 自定义的选择框后缀图标 | ReactNode | - | |
|
||||
| value | 指定选中项 | string\[] | - | |
|
||||
|
@ -59,7 +59,7 @@ The following APIs are shared by DatePicker, YearPicker, MonthPicker, RangePicke
|
||||
| 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 | - | |
|
||||
| size | determine the size of the input box, the height of `large` and `small`, are 40px and 24px respectively, while default size is 32px | `large` \| `middle` \| `small` | - | |
|
||||
| bordered | whether has border style | Boolean | true | |
|
||||
| suffixIcon | The custom suffix icon | ReactNode | - | |
|
||||
| style | to customize the style of the input box | object | {} | |
|
||||
|
@ -61,7 +61,7 @@ import 'moment/locale/zh-cn';
|
||||
| picker | 设置选择器类型 | `date` \| `week` \| `month` \| `year` | `date` | |
|
||||
| placeholder | 输入框提示文字 | string\|RangePicker\[] | - | |
|
||||
| popupStyle | 额外的弹出日历样式 | object | {} | |
|
||||
| size | 输入框大小,`large` 高度为 40px,`small` 为 24px,默认是 32px | string | 无 | |
|
||||
| size | 输入框大小,`large` 高度为 40px,`small` 为 24px,默认是 32px | `large` \| `middle` \| `small` | 无 | |
|
||||
| bordered | 是否有边框 | Boolean | true | |
|
||||
| suffixIcon | 自定义的选择框后缀图标 | ReactNode | - | |
|
||||
| style | 自定义输入框样式 | object | {} | |
|
||||
|
@ -23,7 +23,7 @@ When a numeric value needs to be provided.
|
||||
| parser | Specifies the value extracted from formatter | function( string): number | |
|
||||
| precision | precision of input value | number | |
|
||||
| decimalSeparator | decimal separator | string | |
|
||||
| size | height of input box | string | |
|
||||
| size | height of input box | `large` \| `middle` \| `small` | |
|
||||
| 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) | |
|
||||
|
@ -26,7 +26,7 @@ title: InputNumber
|
||||
| parser | 指定从 formatter 里转换回数字的方式,和 formatter 搭配使用 | function( string): number | |
|
||||
| precision | 数值精度 | number | |
|
||||
| decimalSeparator | 小数点 | string | |
|
||||
| size | 输入框大小 | string | 无 |
|
||||
| size | 输入框大小 | `large` \| `middle` \| `small` | 无 |
|
||||
| step | 每次改变步数,可以为小数 | number\|string | 1 |
|
||||
| value | 当前值 | number | |
|
||||
| onChange | 变化回调 | Function(value: number \| string) | |
|
||||
|
@ -24,7 +24,7 @@ A basic widget for getting the user input is a text field. Keyboard and mouse ca
|
||||
| id | The ID for input | string | |
|
||||
| maxLength | max length | number | |
|
||||
| prefix | The prefix icon for the Input. | string\|ReactNode | |
|
||||
| size | The size of the input box. Note: in the context of a form, the `large` size is used. Available: `large` `default` `small` | string | `default` |
|
||||
| size | The size of the input box. Note: in the context of a form, the `large` size is used. | `large` \| `middle` \| `small` | |
|
||||
| suffix | The suffix icon for the Input. | string\|ReactNode | |
|
||||
| type | The type of input, see: [MDN](https://developer.mozilla.org/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types)(use `Input.TextArea` instead of `type="textarea"`) | string | `text` |
|
||||
| value | The input content value | string | |
|
||||
|
@ -25,7 +25,7 @@ title: Input
|
||||
| id | 输入框的 id | string | |
|
||||
| maxLength | 最大长度 | number | |
|
||||
| prefix | 带有前缀图标的 input | string\|ReactNode | |
|
||||
| size | 控件大小。注:标准表单内的输入框大小限制为 `large`。可选 `large` `default` `small` | string | `default` |
|
||||
| size | 控件大小。注:标准表单内的输入框大小限制为 `large`。 | `large` \| `middle` \| `small` | 无 |
|
||||
| suffix | 带有后缀图标的 input | string\|ReactNode | |
|
||||
| type | 声明 input 类型,同原生 input 标签的 type 属性,见:[MDN](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/input#属性)(请直接使用 `Input.TextArea` 代替 `type="textarea"`)。 | string | `text` |
|
||||
| value | 输入框内容 | string | |
|
||||
|
@ -33,7 +33,7 @@ Radio group can wrap a group of `Radio`。
|
||||
| disabled | Disable all radio buttons | boolean | false |
|
||||
| name | The `name` property of all `input[type="radio"]` children | string | |
|
||||
| options | set children optional | string\[] \| Array<{ label: string value: string disabled?: boolean }> | |
|
||||
| size | size for radio button style | `large` \| `default` \| `small` | `default` |
|
||||
| size | size for radio button style | `large` \| `middle` \| `small` | |
|
||||
| value | Used for setting the currently selected value. | any | |
|
||||
| onChange | The callback function that is triggered when the state changes. | Function(e:Event) | |
|
||||
| buttonStyle | style type of radio button | `outline` \| `solid` | `outline` |
|
||||
|
@ -34,7 +34,7 @@ title: Radio
|
||||
| disabled | 禁选所有子单选器 | boolean | false |
|
||||
| name | RadioGroup 下所有 `input[type="radio"]` 的 `name` 属性 | string | |
|
||||
| options | 以配置形式设置子元素 | string\[] \| Array<{ label: string value: string disabled?: boolean }> | |
|
||||
| size | 大小,只对按钮样式生效 | `large` \| `default` \| `small` | `default` |
|
||||
| size | 大小,只对按钮样式生效 | `large` \| `middle` \| `small` | 无 |
|
||||
| value | 用于设置当前选中的值 | any | |
|
||||
| onChange | 选项变化时的回调函数 | Function(e:Event) | |
|
||||
| buttonStyle | RadioButton 的风格样式,目前有描边和填色两种风格 | `outline` \| `solid` | `outline` |
|
||||
|
@ -49,7 +49,7 @@ Select component to select value from options.
|
||||
| placeholder | Placeholder of select | string\|ReactNode | - | |
|
||||
| showArrow | Whether to show the drop-down arrow | boolean | true | |
|
||||
| showSearch | Whether show search input in single mode. | boolean | false | |
|
||||
| size | Size of Select input. `default` `large` `small` | string | default | |
|
||||
| size | Size of Select input. | `large` \| `middle` \| `small` | | |
|
||||
| suffixIcon | The custom suffix icon | ReactNode | - | |
|
||||
| removeIcon | The custom remove icon | ReactNode | - | |
|
||||
| clearIcon | The custom clear icon | ReactNode | - | |
|
||||
|
@ -50,7 +50,7 @@ title: Select
|
||||
| placeholder | 选择框默认文字 | string | - | |
|
||||
| showArrow | 是否显示下拉小箭头 | boolean | true | |
|
||||
| showSearch | 使单选模式可搜索 | boolean | false | |
|
||||
| size | 选择框大小,可选 `large` `small` | string | default | |
|
||||
| size | 选择框大小 | `large` \| `middle` \| `small` | 无 | |
|
||||
| suffixIcon | 自定义的选择框后缀图标 | ReactNode | - | |
|
||||
| removeIcon | 自定义的多选框清除图标 | ReactNode | - | |
|
||||
| clearIcon | 自定义的多选框清空图标 | ReactNode | - | |
|
||||
|
@ -36,7 +36,7 @@ Tree selection control.
|
||||
| treeIcon | Shows the icon before a TreeNode's title. There is no default style; you must set a custom style for it if set to `true` | boolean | false | |
|
||||
| showCheckedStrategy | The way show selected item in box. **Default:** just show child nodes. **`TreeSelect.SHOW_ALL`:** show all checked treeNodes (include parent treeNode). **`TreeSelect.SHOW_PARENT`:** show checked treeNodes (just show parent treeNode). | enum { TreeSelect.SHOW_ALL, TreeSelect.SHOW_PARENT, TreeSelect.SHOW_CHILD } | TreeSelect.SHOW_CHILD | |
|
||||
| showSearch | Support search or not | boolean | single: `false` \| multiple: `true` | |
|
||||
| size | To set the size of the select input, options: `large` `small` | string | 'default' | |
|
||||
| size | To set the size of the select input | `large` \| `middle` \| `small` | | |
|
||||
| showArrow | Whether to show the `suffixIcon`,when single selection mode, default `true` | boolean | | |
|
||||
| suffixIcon | The custom suffix icon,you must set `showArrow` to `true` manually in multiple selection mode | ReactNode | - | |
|
||||
| treeCheckable | Whether to show checkbox on the treeNodes | boolean | false | |
|
||||
|
@ -37,7 +37,7 @@ title: TreeSelect
|
||||
| treeIcon | 是否展示 TreeNode title 前的图标,没有默认样式,如设置为 true,需要自行定义图标相关样式 | boolean | false | |
|
||||
| showCheckedStrategy | 定义选中项回填的方式。`TreeSelect.SHOW_ALL`: 显示所有选中节点(包括父节点). `TreeSelect.SHOW_PARENT`: 只显示父节点(当父节点下所有子节点都选中时). 默认只显示子节点. | enum{TreeSelect.SHOW_ALL, TreeSelect.SHOW_PARENT, TreeSelect.SHOW_CHILD } | TreeSelect.SHOW_CHILD | |
|
||||
| showSearch | 是否支持搜索框 | boolean | 单选:`false` \| 多选:`true` | |
|
||||
| size | 选择框大小,可选 `large` `small` | string | 'default' | |
|
||||
| size | 选择框大小 | `large` \| `middle` \| `small` | 无 | |
|
||||
| showArrow | 是否显示 `suffixIcon`,单选模式下默认 `true` | boolean | | |
|
||||
| suffixIcon | 自定义的选择框后缀图标, 多选模式下必须同时设置 `showArrow` 为 `true` | ReactNode | - | |
|
||||
| treeCheckable | 显示 checkbox | boolean | false | |
|
||||
|
Loading…
Reference in New Issue
Block a user