fix(components): [tree-v2] setExpandedKeys instead of setExpendKeys (#9413)

* feat(components): [tree-v2] `setExpandKeys` instead of `setExpendKeys`

* chore: update

* chore: update
This commit is contained in:
zz 2022-08-23 13:02:38 +08:00 committed by GitHub
parent 9cb8ce47e8
commit 43b286fec1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -105,7 +105,7 @@ tree-v2/filter
| getCheckedKeys | If the node can be selected (`show-checkbox` is `true`), it returns the currently selected array of node's keys | `(leafOnly: boolean)` |
| setCheckedKeys | set certain nodes to be checked | `(keys: TreeKey[])` |
| setChecked | set node to be checked or not | `(key: TreeKey, checked: boolean)` |
| setExpendKeys | set certain nodes to be expand | `(keys: TreeKey[])` |
| setExpandedKeys | set certain nodes to be expanded | `(keys: TreeKey[])` |
| getHalfCheckedNodes | If the node can be selected (`show-checkbox` is `true`), it returns the currently half selected array of nodes | - |
| getHalfCheckedKeys | If the node can be selected (`show-checkbox` is `true`), it returns the currently half selected array of node's keys | - |
| getCurrentKey | return the highlight node's key (undefined if no node is highlighted) | - |

View File

@ -191,7 +191,7 @@ export function useTree(props: TreeProps, emit) {
}
}
function setExpendKeys(keys: TreeKey[]) {
function setExpandedKeys(keys: TreeKey[]) {
expandedKeySet.value = new Set(keys)
}
@ -304,6 +304,6 @@ export function useTree(props: TreeProps, emit) {
getNode,
expandNode,
collapseNode,
setExpendKeys,
setExpandedKeys,
}
}

View File

@ -93,7 +93,7 @@ export default defineComponent({
getNode,
expandNode,
collapseNode,
setExpendKeys,
setExpandedKeys,
} = useTree(props, ctx.emit)
ctx.expose({
@ -111,7 +111,7 @@ export default defineComponent({
getNode,
expandNode,
collapseNode,
setExpendKeys,
setExpandedKeys,
})
return {