refactor(web): 优化流程节点的定义和实现
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user