fix(components): [tree-v2] updated when pass dynamic defaultCheckedKeys (#8228)

This commit is contained in:
webfansplz
2022-08-31 20:49:18 +08:00
committed by GitHub
parent 5109da3b3c
commit b4e97bc61a

View File

@@ -13,7 +13,7 @@ export function useCheck(props: TreeProps, tree: Ref<Tree | undefined>) {
const { emit } = getCurrentInstance()!
watch(
() => tree.value,
[() => tree.value, () => props.defaultCheckedKeys],
() => {
return nextTick(() => {
_setCheckedKeys(props.defaultCheckedKeys)