feat(web): 增加节点分组
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import {type Connection, type Edge, getOutgoers, type Node} from '@xyflow/react'
|
||||
import {find, has, isEmpty, isEqual, lpad, toStr} from 'licia'
|
||||
import NodeRegistry from './NodeRegistry.tsx'
|
||||
import {NodeRegistryMap} from './NodeRegistry.tsx'
|
||||
|
||||
export class CheckError extends Error {
|
||||
readonly id: string
|
||||
@@ -83,7 +83,7 @@ export const checkSave: (inputSchema: Record<string, Record<string, any>>, nodes
|
||||
throw nodeTypeNotFound()
|
||||
}
|
||||
let nodeType = node.type!
|
||||
let nodeDefine = NodeRegistry[nodeType]
|
||||
let nodeDefine = NodeRegistryMap[nodeType]
|
||||
for (let checker of nodeDefine.checkers) {
|
||||
let checkResult = checker(nodeId, inputSchema, nodes, edges, data)
|
||||
if (checkResult.error) {
|
||||
|
||||
Reference in New Issue
Block a user