feat(web): 调整节点入参形式

This commit is contained in:
v-zhangjc9
2025-06-26 14:38:09 +08:00
parent 873c1a1d20
commit a2aba82b6e
8 changed files with 54 additions and 196 deletions

View File

@@ -2,13 +2,12 @@ import type {NodeProps} from '@xyflow/react'
import {commonInfo} from '../../../../util/amis.tsx'
import AmisNode from './AmisNode.tsx'
const KnowledgeNode = (props: NodeProps) => AmisNode(
props,
'normal',
'知识库',
'查询知识库获取外部知识',
undefined,
[
const KnowledgeNode = (props: NodeProps) => AmisNode({
nodeProps: props,
type: 'normal',
defaultNodeName: '知识库',
defaultNodeDescription: '查询知识库获取外部知识',
columnSchema: [
{
type: 'select',
name: 'knowledgeId',
@@ -24,7 +23,7 @@ const KnowledgeNode = (props: NodeProps) => AmisNode(
...payload,
data: {
items: payload.data.items.map((item: any) => ({value: item['id'], label: item['name']})),
}
},
}
},
},
@@ -53,6 +52,6 @@ const KnowledgeNode = (props: NodeProps) => AmisNode(
step: 0.05,
},
],
)
})
export default KnowledgeNode