Merge pull request #156 from SuanmoSuanyangTechnology/feature/ui_zy

refactor: extract useVariableList; properties add output variable
This commit is contained in:
yingzhao
2026-01-20 10:43:36 +08:00
committed by GitHub
14 changed files with 861 additions and 1008 deletions

View File

@@ -275,11 +275,6 @@ export const useWorkflowGraph = ({
}, 100)
}
if (edges.length) {
// 计算loop和iteration类型节点的数量
const loopIterationCount = nodes.filter(node =>
node.type === 'loop' || node.type === 'iteration'
).length;
// 去重处理对于if-else和question-classifier节点不同连接桩允许连接到相同节点
const uniqueEdges = edges.filter((edge, index, arr) => {
return arr.findIndex(e => {
@@ -805,6 +800,9 @@ export const useWorkflowGraph = ({
validateConnection({ sourceCell, targetCell, targetMagnet }) {
if (!targetMagnet) return false;
// 节点不能与自己连线
if (sourceCell?.id === targetCell?.id) return false;
const sourceType = sourceCell?.getData()?.type;
const targetType = targetCell?.getData()?.type;