fix(web): workflow properties
This commit is contained in:
@@ -31,6 +31,7 @@ const Properties: FC<PropertiesProps> = ({
|
||||
const [editIndex, setEditIndex] = useState<number | null>(null)
|
||||
|
||||
useEffect(() => {
|
||||
form.resetFields()
|
||||
if (selectedNode && form) {
|
||||
const { type = 'default', name = '', config } = selectedNode.getData() || {}
|
||||
const initialValue: Record<string, any> = {}
|
||||
|
||||
@@ -624,7 +624,7 @@ export const useWorkflowGraph = ({
|
||||
let nodeLibraryConfig = [...nodeLibrary]
|
||||
.flatMap(category => category.nodes)
|
||||
.find(n => n.type === dragData.type);
|
||||
nodeLibraryConfig = { config: {}, ...nodeLibraryConfig } as NodeProperties;
|
||||
nodeLibraryConfig = JSON.parse(JSON.stringify({ config: {}, ...nodeLibraryConfig })) as NodeProperties
|
||||
|
||||
// 创建干净的节点数据,只保留必要的字段
|
||||
const cleanNodeData = {
|
||||
|
||||
Reference in New Issue
Block a user