feat: treeSelect `treeExpandedKeys` support `.sync` modifier

pull/398/head
tangjinzhou 6 years ago
parent 6373ce8e92
commit 983318b985

@ -28,7 +28,7 @@
| 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 |
| treeDefaultExpandAll | Whether to expand all treeNodes by default | boolean | false |
| treeDefaultExpandedKeys | Default expanded treeNodes | string\[] \| number\[] | - |
| treeExpandedKeys | Set expanded keys | string\[] \| number\[] | - |
| treeExpandedKeys(.sync) | Set expanded keys | string\[] \| number\[] | - |
| treeNodeFilterProp | Will be used for filtering if `filterTreeNode` returns true | string | 'value' |
| treeNodeLabelProp | Will render as content of select | string | 'title' |
| value(v-model) | To set the current selected treeNode(s). | string\|string\[] | - |

@ -28,7 +28,7 @@
| treeDataSimpleMode | 使用简单格式的 treeData具体设置参考可设置的类型 (此时 treeData 应变为这样的数据结构: [{id:1, pId:0, value:'1', label:"test1",...},...], `pId` 是父节点的 id) | false\|Array<{ id: string, pId: string, rootPId: null }> | false |
| treeDefaultExpandAll | 默认展开所有树节点 | boolean | false |
| treeDefaultExpandedKeys | 默认展开的树节点 | string\[] \| number\[] | - |
| treeExpandedKeys | 设置展开的树节点 | string\[] \| number\[] | - |
| treeExpandedKeys(.sync) | 设置展开的树节点 | string\[] \| number\[] | - |
| treeNodeFilterProp | 输入项过滤对应的 treeNode 属性 | string | 'value' |
| treeNodeLabelProp | 作为显示的 prop 设置 | string | 'title' |
| value(v-model) | 指定当前选中的条目 | string/string\[] | - |

@ -140,6 +140,7 @@ const BasePopup = {
this.__emit('treeExpanded')
})
}
this.__emit('update:treeExpandedKeys', expandedKeyList)
this.__emit('treeExpand', expandedKeyList)
},

Loading…
Cancel
Save