refactor(web): 优化节点展现

This commit is contained in:
v-zhangjc9
2025-07-10 12:44:37 +08:00
parent 5e763637da
commit f707a0d2b5
7 changed files with 202 additions and 145 deletions

View File

@@ -1,14 +1,16 @@
import type {NodeProps} from '@xyflow/react'
import React from 'react'
import React, {useCallback} from 'react'
import AmisNode, {EndNodeHandler, outputsFormColumns} from './AmisNode.tsx'
const OutputNode = (props: NodeProps) => {
const columnsSchema = useCallback(() => outputsFormColumns(true), [props.id])
return (
<AmisNode
nodeProps={props}
defaultNodeName="输出节点"
defaultNodeDescription="定义输出变量"
columnSchema={() => outputsFormColumns(true)}
columnSchema={columnsSchema}
handler={<EndNodeHandler/>}
/>
)