增加工具栏提示。
This commit is contained in:
parent
692a6030eb
commit
e2d06ece26
@ -200,7 +200,16 @@ const NodeConfigDrawer: React.FC<NodeConfigDrawerProps> = ({
|
||||
layout="vertical"
|
||||
initialValues={{}}
|
||||
>
|
||||
{renderFormItems()}
|
||||
<Form.Item name="code" hidden>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
{nodeDefinition?.graphConfig.configSchema &&
|
||||
Object.entries(nodeDefinition.graphConfig.configSchema.properties).map(([key, property]) => {
|
||||
// 跳过 code 字段的显示
|
||||
if (key === 'code') return null;
|
||||
const required = nodeDefinition.graphConfig.configSchema.required?.includes(key) || false;
|
||||
return renderFormItem(key, property as SchemaProperty, required);
|
||||
})}
|
||||
</Form>
|
||||
</Drawer>
|
||||
);
|
||||
|
||||
@ -16,7 +16,6 @@ export const addNodeToGraph = (
|
||||
position?: { x: number, y: number }
|
||||
) => {
|
||||
let nodeDefinition = workflowNodeDefinitionList.find(def => def.type === workflowDefinitionNode.type);
|
||||
console.log(nodeDefinition.graphConfig.uiSchema, workflowDefinitionNode.graph)
|
||||
let uiGraph = isNew ? nodeDefinition.graphConfig.uiSchema : workflowDefinitionNode.graph;
|
||||
// 根据形状类型设置正确的 shape
|
||||
let shape = 'rect'; // 默认使用矩形
|
||||
@ -25,7 +24,6 @@ export const addNodeToGraph = (
|
||||
} else if (uiGraph.shape === 'diamond') {
|
||||
shape = 'polygon';
|
||||
}
|
||||
console.log(nodeDefinition.type, workflowDefinitionNode.type)
|
||||
// 创建节点
|
||||
return graph.addNode({
|
||||
inherit: 'rect',
|
||||
@ -50,7 +48,6 @@ export const addNodeToGraph = (
|
||||
type: isNew ? nodeDefinition.type : workflowDefinitionNode.type,
|
||||
code: uiGraph.code,
|
||||
ports: convertPortConfig(uiGraph.ports),
|
||||
nodeDefinition: nodeDefinition,
|
||||
aaaaaa: "dasdasdsadasdd"
|
||||
nodeDefinition: nodeDefinition
|
||||
});
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user