test tree

This commit is contained in:
Theluyuan 2023-05-15 09:12:50 +08:00
parent eb3f2e831c
commit 8f88083070
5 changed files with 8 additions and 8 deletions

View File

@ -303,7 +303,7 @@ class Tree {
} }
setCheckedKeys(checked, checkStrictly, node) { setCheckedKeys(checked, checkStrictly, node) {
node.isChecked = checked; node.isChecked = checked;
if (!node.selectParent) { if (node.selectParent) {
return false; return false;
} }
if (!checkStrictly) { if (!checkStrictly) {
@ -391,7 +391,7 @@ const _sfc_main = defineComponent({
}; };
} }, } },
hideicon: { type: Boolean }, hideicon: { type: Boolean },
selectParent: { type: Boolean, default: true } selectParent: { type: Boolean, default: false }
}, },
emits: ["update:checkedKeys", "update:expandKeys", "node-click"], emits: ["update:checkedKeys", "update:expandKeys", "node-click"],
setup(__props, { emit }) { setup(__props, { emit }) {

View File

@ -17900,7 +17900,7 @@ class Tree {
} }
setCheckedKeys(checked, checkStrictly, node) { setCheckedKeys(checked, checkStrictly, node) {
node.isChecked = checked; node.isChecked = checked;
if (!node.selectParent) { if (node.selectParent) {
return false; return false;
} }
if (!checkStrictly) { if (!checkStrictly) {
@ -17988,7 +17988,7 @@ const _sfc_main$J = defineComponent({
}; };
} }, } },
hideicon: { type: Boolean }, hideicon: { type: Boolean },
selectParent: { type: Boolean, default: true } selectParent: { type: Boolean, default: false }
}, },
emits: ["update:checkedKeys", "update:expandKeys", "node-click"], emits: ["update:checkedKeys", "update:expandKeys", "node-click"],
setup(__props, { emit }) { setup(__props, { emit }) {

View File

@ -66,7 +66,7 @@ const props = withDefaults(defineProps<TreeProps>(), {
title: "title", title: "title",
}; };
}, },
selectParent:true selectParent:false
}); });
const slots = useSlots(); const slots = useSlots();

View File

@ -186,7 +186,7 @@ class Tree {
node: TreeData node: TreeData
) { ) {
node.isChecked = checked; node.isChecked = checked;
if (!node.selectParent) { if (node.selectParent) {
return false; return false;
} }
if (!checkStrictly) { if (!checkStrictly) {

File diff suppressed because one or more lines are too long