refractor(web): 增加输入节点

This commit is contained in:
2025-07-20 17:17:22 +08:00
parent 77a09472aa
commit a5282762ed
14 changed files with 462 additions and 257 deletions

View File

@@ -1,5 +1,5 @@
import {PlusCircleFilled} from '@ant-design/icons'
import {Button, Dropdown} from 'antd'
import {Button, Dropdown, message} from 'antd'
import type {ButtonProps} from 'antd/lib'
import {isEqual, randomId, unique} from 'licia'
import {commonInfo} from '../../../util/amis.tsx'
@@ -34,7 +34,7 @@ const AddNodeButton = (props: AddNodeButtonProps) => {
if (commonInfo.debug) {
console.info('Add', key, JSON.stringify({nodes, edges, data}))
}
checkAddNode(key, nodes, edges)
checkAddNode(key, props.parent, nodes, edges)
let nodeId = randomId(10, 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM')
let define = NodeRegistryMap[key]
@@ -62,7 +62,7 @@ const AddNodeButton = (props: AddNodeButtonProps) => {
})
} catch (e) {
// @ts-ignore
messageApi.error(e.toString())
message.error(e.toString())
}
},
}}