refractor(web): 增加输入节点
This commit is contained in:
@@ -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())
|
||||
}
|
||||
},
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user