docs: 📖 TreeSelect switcherIcon doc (#22489)

close #22487
This commit is contained in:
偏右 2020-03-22 18:00:55 +08:00 committed by GitHub
parent 0519111a99
commit dfb9f20385
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 2 deletions

View File

@ -34,6 +34,7 @@ Tree selection control.
| placeholder | Placeholder of the select input | string | - | |
| searchValue | work with `onSearch` to make search value controlled. | string | - | |
| 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 | |
| switcherIcon | customize collapse/expand icon of tree node | ReactNode | - |
| 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 | `large` \| `middle` \| `small` | | |

View File

@ -35,6 +35,7 @@ title: TreeSelect
| placeholder | 选择框默认文字 | string | - | |
| searchValue | 搜索框的值,可以通过 `onSearch` 获取用户输入 | string | - | |
| treeIcon | 是否展示 TreeNode title 前的图标,没有默认样式,如设置为 true需要自行定义图标相关样式 | boolean | false | |
| switcherIcon | 自定义树节点的展开/折叠图标 | ReactNode | - |
| 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` \| `middle` \| `small` | 无 | |

View File

@ -36,7 +36,7 @@ Almost anything can be represented in a tree structure. Examples include directo
| selectable | whether can be selected | boolean | true |
| selectedKeys | (Controlled) Specifies the keys of the selected treeNodes | string\[] | - |
| showIcon | 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 |
| switcherIcon | customize collapse/expand icon of tree node | React.ReactElement | - |
| switcherIcon | customize collapse/expand icon of tree node | ReactNode | - |
| showLine | Shows a connecting line | boolean | false |
| onCheck | Callback function for when the onCheck event occurs | function(checkedKeys, e:{checked: bool, checkedNodes, node, event, halfCheckedKeys}) | - |
| onDragEnd | Callback function for when the onDragEnd event occurs | function({event, node}) | - |

View File

@ -37,7 +37,7 @@ subtitle: 树形控件
| selectable | 是否可选中 | boolean | true |
| selectedKeys | (受控)设置选中的树节点 | string\[] | - |
| showIcon | 是否展示 TreeNode title 前的图标,没有默认样式,如设置为 true需要自行定义图标相关样式 | boolean | false |
| switcherIcon | 自定义树节点的展开/折叠图标 | React.ReactElement | - |
| switcherIcon | 自定义树节点的展开/折叠图标 | ReactNode | - |
| showLine | 是否展示连接线 | boolean | false |
| onCheck | 点击复选框触发 | function(checkedKeys, e:{checked: bool, checkedNodes, node, event, halfCheckedKeys}) | - |
| onDragEnd | dragend 触发时调用 | function({event, node}) | - |