mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
update rc-tree-select to 2.0.1
This commit is contained in:
parent
11dba9c305
commit
4cf18eaae8
@ -2,16 +2,14 @@
|
||||
|
||||
exports[`renders ./components/tree-select/demo/basic.md correctly 1`] = `
|
||||
<span
|
||||
aria-haspopup="listbox"
|
||||
class="ant-select ant-select-enabled ant-select-allow-clear"
|
||||
role="combobox"
|
||||
style="width:300px"
|
||||
tabindex="0"
|
||||
>
|
||||
<span
|
||||
aria-autocomplete="list"
|
||||
aria-haspopup="true"
|
||||
class="ant-select-selection
|
||||
ant-select-selection--single"
|
||||
role="combobox"
|
||||
tabindex="0"
|
||||
class="ant-select-selection ant-select-selection--single"
|
||||
>
|
||||
<span
|
||||
class="ant-select-selection__rendered"
|
||||
@ -34,21 +32,21 @@ exports[`renders ./components/tree-select/demo/basic.md correctly 1`] = `
|
||||
|
||||
exports[`renders ./components/tree-select/demo/checkable.md correctly 1`] = `
|
||||
<span
|
||||
aria-haspopup="listbox"
|
||||
class="ant-select ant-select-enabled"
|
||||
role="combobox"
|
||||
style="width:300px"
|
||||
tabindex="-1"
|
||||
>
|
||||
<span
|
||||
aria-autocomplete="list"
|
||||
aria-haspopup="true"
|
||||
class="ant-select-selection
|
||||
ant-select-selection--multiple"
|
||||
role="combobox"
|
||||
class="ant-select-selection ant-select-selection--multiple"
|
||||
>
|
||||
<ul
|
||||
class="ant-select-selection__rendered"
|
||||
>
|
||||
<li
|
||||
class="ant-select-selection__choice"
|
||||
role="menuitem"
|
||||
style="user-select:none;-webkit-user-select:none"
|
||||
title="Node1"
|
||||
unselectable="unselectable"
|
||||
@ -69,8 +67,11 @@ exports[`renders ./components/tree-select/demo/checkable.md correctly 1`] = `
|
||||
class="ant-select-search__field__wrap"
|
||||
>
|
||||
<input
|
||||
aria-autocomplete="list"
|
||||
aria-label="filter select"
|
||||
aria-multiline="false"
|
||||
class="ant-select-search__field"
|
||||
role="textbox"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
<span
|
||||
@ -93,15 +94,14 @@ exports[`renders ./components/tree-select/demo/checkable.md correctly 1`] = `
|
||||
|
||||
exports[`renders ./components/tree-select/demo/multiple.md correctly 1`] = `
|
||||
<span
|
||||
aria-haspopup="listbox"
|
||||
class="ant-select ant-select-enabled ant-select-allow-clear"
|
||||
role="combobox"
|
||||
style="width:300px"
|
||||
tabindex="-1"
|
||||
>
|
||||
<span
|
||||
aria-autocomplete="list"
|
||||
aria-haspopup="true"
|
||||
class="ant-select-selection
|
||||
ant-select-selection--multiple"
|
||||
role="combobox"
|
||||
class="ant-select-selection ant-select-selection--multiple"
|
||||
>
|
||||
<ul
|
||||
class="ant-select-selection__rendered"
|
||||
@ -113,8 +113,11 @@ exports[`renders ./components/tree-select/demo/multiple.md correctly 1`] = `
|
||||
class="ant-select-search__field__wrap"
|
||||
>
|
||||
<input
|
||||
aria-autocomplete="list"
|
||||
aria-label="filter select"
|
||||
aria-multiline="false"
|
||||
class="ant-select-search__field"
|
||||
role="textbox"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
<span
|
||||
@ -137,16 +140,14 @@ exports[`renders ./components/tree-select/demo/multiple.md correctly 1`] = `
|
||||
|
||||
exports[`renders ./components/tree-select/demo/treeData.md correctly 1`] = `
|
||||
<span
|
||||
aria-haspopup="listbox"
|
||||
class="ant-select ant-select-enabled"
|
||||
role="combobox"
|
||||
style="width:300px"
|
||||
tabindex="0"
|
||||
>
|
||||
<span
|
||||
aria-autocomplete="list"
|
||||
aria-haspopup="true"
|
||||
class="ant-select-selection
|
||||
ant-select-selection--single"
|
||||
role="combobox"
|
||||
tabindex="0"
|
||||
class="ant-select-selection ant-select-selection--single"
|
||||
>
|
||||
<span
|
||||
class="ant-select-selection__rendered"
|
||||
|
@ -19,28 +19,28 @@ import { TreeSelect } from 'antd';
|
||||
const SHOW_PARENT = TreeSelect.SHOW_PARENT;
|
||||
|
||||
const treeData = [{
|
||||
label: 'Node1',
|
||||
title: 'Node1',
|
||||
value: '0-0',
|
||||
key: '0-0',
|
||||
children: [{
|
||||
label: 'Child Node1',
|
||||
title: 'Child Node1',
|
||||
value: '0-0-0',
|
||||
key: '0-0-0',
|
||||
}],
|
||||
}, {
|
||||
label: 'Node2',
|
||||
title: 'Node2',
|
||||
value: '0-1',
|
||||
key: '0-1',
|
||||
children: [{
|
||||
label: 'Child Node3',
|
||||
title: 'Child Node3',
|
||||
value: '0-1-0',
|
||||
key: '0-1-0',
|
||||
}, {
|
||||
label: 'Child Node4',
|
||||
title: 'Child Node4',
|
||||
value: '0-1-1',
|
||||
key: '0-1-1',
|
||||
}, {
|
||||
label: 'Child Node5',
|
||||
title: 'Child Node5',
|
||||
value: '0-1-2',
|
||||
key: '0-1-2',
|
||||
}],
|
||||
|
@ -18,20 +18,20 @@ The tree structure can be populated using `treeData` property. This is a quick a
|
||||
import { TreeSelect } from 'antd';
|
||||
|
||||
const treeData = [{
|
||||
label: 'Node1',
|
||||
title: 'Node1',
|
||||
value: '0-0',
|
||||
key: '0-0',
|
||||
children: [{
|
||||
label: 'Child Node1',
|
||||
title: 'Child Node1',
|
||||
value: '0-0-1',
|
||||
key: '0-0-1',
|
||||
}, {
|
||||
label: 'Child Node2',
|
||||
title: 'Child Node2',
|
||||
value: '0-0-2',
|
||||
key: '0-0-2',
|
||||
}],
|
||||
}, {
|
||||
label: 'Node2',
|
||||
title: 'Node2',
|
||||
value: '0-1',
|
||||
key: '0-1',
|
||||
}];
|
||||
|
@ -35,8 +35,8 @@ Any data whose entries are defined in a hierarchical manner is fit to use this c
|
||||
| size | To set the size of the select input, options: `large` `small` | string | 'default' |
|
||||
| treeCheckable | Whether to show checkbox on the treeNodes | boolean | false |
|
||||
| treeCheckStrictly | Whether to check nodes precisely (in the `checkable` mode), means parent and child nodes are not associated, and it will make `labelInValue` be true | boolean | false |
|
||||
| treeData | Data of the treeNodes, manual construction work is no longer needed if this property has been set(ensure the Uniqueness of each value) | array<{ value, label, children, [disabled, disableCheckbox, selectable] }>(when title is defined,label's value will be covered) | \[] |
|
||||
| treeDataSimpleMode | Enable simple mode of treeData.(treeData should like this: [{id:1, pId:0, value:'1', label:"test1",...},...], pId is parent node's id) | false\|Array<{ id: string, pId: string, rootPId: null }> | false |
|
||||
| treeData | Data of the treeNodes, manual construction work is no longer needed if this property has been set(ensure the Uniqueness of each value) | array<{ value, title, children, [disabled, disableCheckbox, selectable] }> | \[] |
|
||||
| treeDataSimpleMode | Enable simple mode of treeData.(treeData should like this: [{id:1, pId:0, value:'1', title:"test1",...},...], pId is parent node's id) | false\|Array<{ id: string, pId: string, rootPId: null }> | false |
|
||||
| treeDefaultExpandAll | Whether to expand all treeNodes by default | boolean | false |
|
||||
| treeDefaultExpandedKeys | Default expanded treeNodes | string\[] | - |
|
||||
| treeNodeFilterProp | Will be used for filtering if `filterTreeNode` returns true | string | 'value' |
|
||||
|
@ -35,8 +35,8 @@ title: TreeSelect
|
||||
| size | 选择框大小,可选 `large` `small` | string | 'default' |
|
||||
| treeCheckable | 显示 checkbox | boolean | false |
|
||||
| treeCheckStrictly | checkable 状态下节点选择完全受控(父子节点选中状态不再关联),会使得 `labelInValue` 强制为 true | boolean | false |
|
||||
| treeData | treeNodes 数据,如果设置则不需要手动构造 TreeNode 节点(value 在整个树范围内唯一) | array<{value, label, children, [disabled, disableCheckbox, selectable]}>(如果定义了title,label会被title覆盖) | \[] |
|
||||
| treeDataSimpleMode | 使用简单格式的 treeData,具体设置参考可设置的类型 (此时 treeData 应变为这样的数据结构: [{id:1, pId:0, value:'1', label:"test1",...},...], `pId` 是父节点的 id) | false\|Array<{ id: string, pId: string, rootPId: null }> | false |
|
||||
| treeData | treeNodes 数据,如果设置则不需要手动构造 TreeNode 节点(value 在整个树范围内唯一) | array<{value, title, children, [disabled, disableCheckbox, selectable]}> | \[] |
|
||||
| treeDataSimpleMode | 使用简单格式的 treeData,具体设置参考可设置的类型 (此时 treeData 应变为这样的数据结构: [{id:1, pId:0, value:'1', title:"test1",...},...], `pId` 是父节点的 id) | false\|Array<{ id: string, pId: string, rootPId: null }> | false |
|
||||
| treeDefaultExpandAll | 默认展开所有树节点 | boolean | false |
|
||||
| treeDefaultExpandedKeys | 默认展开的树节点 | string\[] | - |
|
||||
| treeNodeFilterProp | 输入项过滤对应的 treeNode 属性 | string | 'value' |
|
||||
|
@ -76,7 +76,7 @@
|
||||
"rc-time-picker": "~3.3.0",
|
||||
"rc-tooltip": "~3.7.0",
|
||||
"rc-tree": "~1.12.0",
|
||||
"rc-tree-select": "~1.12.0",
|
||||
"rc-tree-select": "~2.0.1",
|
||||
"rc-upload": "~2.5.0",
|
||||
"rc-util": "^4.0.4",
|
||||
"react-lazy-load": "^3.0.12",
|
||||
|
Loading…
Reference in New Issue
Block a user