Closed oubohua closed 7 months ago
或者有没有办法在赋值后触发check-change事件
稍加点东西即可
setTreeValue() {
let arr = [];
for (let i = 10; i < 3000; i++) {
arr.push(`id-${i}`);
}
const allNodes = this.$refs["veTree"].store._getAllNodes();
for (const node of allNodes) {
if (arr.includes(node.key)) {
node.checked = true;
// 对父级节点增加半选效果
if (node.parent && node.parent.indeterminate == false) {
node.parent.indeterminate = true;
}
}
}
}
Originally posted by @oubohua in https://github.com/wchbrad/vue-easy-tree/issues/43#issuecomment-1922739657