feat(web): 调整节点入参形式
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user