diff --git a/project/dv/apps/components/vue-okr-tree/OkrTreeNode.vue b/project/dv/apps/components/vue-okr-tree/OkrTreeNode.vue index 23bb648a..0099cdc1 100644 --- a/project/dv/apps/components/vue-okr-tree/OkrTreeNode.vue +++ b/project/dv/apps/components/vue-okr-tree/OkrTreeNode.vue @@ -240,7 +240,7 @@ export default { return ( (this.tree.store.direction === "horizontal" && this.showCollapsable && - this.leftChildNodes.length > 0) + this.leftChildNodes.length > 0) ) }, // 节点的宽度 @@ -356,6 +356,11 @@ export default { this.node.collapse(); this.tree.$emit("node-collapse", this.node.data, this.node, this); } else { + if (this.node.parent.childNodes && this.node.parent.childNodes.length) { + this.node.parent.childNodes.forEach(e => { + e.collapse() + }) + } this.node.expand(); this.tree.$emit("node-expand", this.node.data, this.node, this); }