mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-10 07:07:56 +08:00
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:
parent
9cb8ce47e8
commit
43b286fec1
@ -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) | - |
|
||||
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user