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

@@ -1,5 +1,5 @@
import { w as withInstall } from "../badge/index2.js";
import { defineComponent, useSlots, computed, resolveComponent, openBlock, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, createVNode, unref, withModifiers, createBlock, createCommentVNode, renderSlot, createTextVNode, toDisplayString, withCtx, createSlots, ref, watch, onMounted, nextTick } from "vue";
import { defineComponent, useSlots, computed, resolveComponent, openBlock, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, createVNode, unref, withModifiers, createBlock, createCommentVNode, renderSlot, createTextVNode, toDisplayString, withCtx, createSlots, ref, watch, nextTick, onMounted } from "vue";
import { _ as _sfc_main$2E, a as _sfc_main$2 } from "../checkbox/index2.js";
import { _ as _sfc_main$3 } from "../transition/index2.js";
const _hoisted_1 = ["onClick"];
@@ -421,11 +421,13 @@ const _sfc_main = defineComponent({
loadNodeList();
}, { deep: true, immediate: true });
watch(() => props.checkedKeys, () => {
console.log("\u91CD\u65B0\u52A0\u8F7D", unWatch.value);
if (!unWatch.value) {
console.log("\u91CD\u65B0\u52A0\u8F7D");
loadNodeList();
}
nextTick(() => {
console.log("\u91CD\u65B0\u52A0\u8F7D", unWatch.value);
if (!unWatch.value) {
console.log("\u91CD\u65B0\u52A0\u8F7D");
loadNodeList();
}
});
}, {
deep: true
});
@@ -434,9 +436,9 @@ const _sfc_main = defineComponent({
const { checkedKeys } = tree.value.getKeys();
unWatch.value = true;
emit("update:checkedKeys", checkedKeys);
setTimeout(() => {
nextTick(() => {
unWatch.value = false;
}, 0);
});
}
}, { deep: true });
onMounted(() => {