This commit is contained in:
吴红兵
2026-03-07 12:35:45 +08:00
parent 271710e870
commit b997b3ba48
423 changed files with 79612 additions and 91574 deletions

View File

@@ -60,15 +60,15 @@ export default {
if (this.addPosition !== 'right' || !this.node || !this.parent) {
return true;
}
// 获取当前节点已有的连接数量
const existingConnections = this.parent.connections?.filter((conn) => conn.sourceId === this.node.id) || [];
// 如果不是分支节点且已经有连接,则不能向右添加
if (!['switch', 'question'].includes(this.node.type) && existingConnections.length > 0) {
return false;
}
return true;
},
nodeTypes() {