feat(web): 节点增加入参变量

This commit is contained in:
v-zhangjc9
2025-06-27 10:04:48 +08:00
parent 635c6537ed
commit 6e667c45e1
6 changed files with 78 additions and 69 deletions

View File

@@ -1,6 +1,5 @@
import type {NodeProps} from '@xyflow/react'
import {horizontalFormOptions} from '../../../../util/amis.tsx'
import AmisNode, {outputsFormColumns} from './AmisNode.tsx'
import AmisNode, {inputsFormColumns, outputsFormColumns} from './AmisNode.tsx'
const CodeNode = (props: NodeProps) => AmisNode({
nodeProps: props,
@@ -8,27 +7,7 @@ const CodeNode = (props: NodeProps) => AmisNode({
defaultNodeName: '代码执行',
defaultNodeDescription: '执行自定义的处理代码',
columnSchema: [
{
type: 'input-kvs',
name: 'inputs',
label: '输入变量',
addButtonText: '新增输入',
draggable: false,
keyItem: {
...horizontalFormOptions(),
label: '参数名称',
},
valueItems: [
{
...horizontalFormOptions(),
type: 'select',
name: 'type',
label: '变量',
required: true,
options: [],
},
],
},
...inputsFormColumns(),
{
type: 'divider',
},