Skip to content

Commit a3b5152

Browse files
committedOct 22, 2024
feat: setExpand API返回Promise
1 parent 2a8d8f5 commit a3b5152

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/hooks/usePublicTreeAPI.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ITreeNodeOptions } from "../store/tree-node"
55
import { FilterFunctionType } from "../store/tree-store"
66
import { TreeProps } from "../components/Tree.vue"
77

8-
type IUsePublicTreeAPIProps = Required<Pick<TreeProps,
8+
type IUsePublicTreeAPIProps = Required<Pick<TreeProps,
99
'selectable' |
1010
'checkable' |
1111
'separator' |
@@ -82,8 +82,8 @@ export const usePublicTreeAPI = (
8282
key: TreeNodeKeyType,
8383
value: boolean,
8484
expandParent: boolean = true
85-
): void {
86-
nonReactive.store.setExpand(key, value, expandParent)
85+
): Promise<void> {
86+
return nonReactive.store.setExpand(key, value, expandParent)
8787
}
8888
function setExpandKeys(keys: TreeNodeKeyType[], value: boolean): void {
8989
nonReactive.store.setExpandKeys(keys, value)

0 commit comments

Comments
 (0)
Please sign in to comment.