refactor(web): 优化流程节点的定义和实现

This commit is contained in:
v-zhangjc9
2025-07-10 12:08:13 +08:00
parent 898e20d5d7
commit 5e763637da
10 changed files with 467 additions and 513 deletions

View File

@@ -1,13 +1,17 @@
import type {NodeProps} from '@xyflow/react'
import AmisNode, {outputsFormColumns} from './AmisNode.tsx'
import React from 'react'
import AmisNode, {EndNodeHandler, outputsFormColumns} from './AmisNode.tsx'
const OutputNode = (props: NodeProps) => AmisNode({
nodeProps: props,
type: 'end',
defaultNodeName: '输出节点',
defaultNodeDescription: '定义输出变量',
columnSchema: () => outputsFormColumns(true),
})
const OutputNode = (props: NodeProps) => {
return (
<AmisNode
nodeProps={props}
defaultNodeName="输出节点"
defaultNodeDescription="定义输出变量"
columnSchema={() => outputsFormColumns(true)}
handler={<EndNodeHandler/>}
/>
)
}
export default React.memo(OutputNode)