test tree

This commit is contained in:
2023-05-18 09:55:23 +08:00
parent 53e1658503
commit 326b5598ba
4 changed files with 29 additions and 23 deletions

View File

@@ -103,11 +103,13 @@ watch(
watch(
() => props.checkedKeys,
() => {
console.log("重新加载",unWatch.value)
if (!unWatch.value) {
console.log("重新加载")
loadNodeList();
}
nextTick(()=>{
console.log("重新加载",unWatch.value)
if (!unWatch.value) {
console.log("重新加载")
loadNodeList();
}
})
},
{
deep: true
@@ -121,9 +123,9 @@ watch(
const { checkedKeys } = tree.value.getKeys();
unWatch.value = true;
emit("update:checkedKeys", checkedKeys);
setTimeout(() => {
nextTick(() => {
unWatch.value = false;
}, 0);
});
}
},
{ deep: true }