test tree

This commit is contained in:
Theluyuan 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(() => {

View File

@ -18018,11 +18018,13 @@ const _sfc_main$J = 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
});
@ -18031,9 +18033,9 @@ const _sfc_main$J = defineComponent({
const { checkedKeys } = tree.value.getKeys();
unWatch.value = true;
emit("update:checkedKeys", checkedKeys);
setTimeout(() => {
nextTick(() => {
unWatch.value = false;
}, 0);
});
}
}, { deep: true });
onMounted(() => {

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 }

File diff suppressed because one or more lines are too long