feat(web): 调整节点入参形式
This commit is contained in:
@@ -3,7 +3,7 @@ import {Handle, type NodeProps, Position} from '@xyflow/react'
|
||||
import type {Schema} from 'amis'
|
||||
import {Card, Dropdown} from 'antd'
|
||||
import {isEmpty, isEqual} from 'licia'
|
||||
import type {JSX} from 'react'
|
||||
import {type JSX} from 'react'
|
||||
import {horizontalFormOptions} from '../../../../util/amis.tsx'
|
||||
|
||||
export type AmisNodeType = 'normal' | 'start' | 'end'
|
||||
@@ -55,15 +55,24 @@ export function outputsFormColumns(editable: boolean = false, required: boolean
|
||||
]
|
||||
}
|
||||
|
||||
const AmisNode = (
|
||||
props: NodeProps,
|
||||
interface AmisNodeProps {
|
||||
nodeProps: NodeProps,
|
||||
type: AmisNodeType,
|
||||
defaultNodeName: String,
|
||||
defaultNodeDescription?: String,
|
||||
extraNodeDescription?: (nodeData: any) => JSX.Element,
|
||||
columnSchema?: Schema[],
|
||||
) => {
|
||||
const {id, data} = props
|
||||
}
|
||||
|
||||
const AmisNode: (props: AmisNodeProps) => JSX.Element = ({
|
||||
nodeProps,
|
||||
type,
|
||||
defaultNodeName,
|
||||
defaultNodeDescription,
|
||||
extraNodeDescription,
|
||||
columnSchema,
|
||||
}) => {
|
||||
const {id, data} = nodeProps
|
||||
const {getDataById, removeNode, editNode} = data
|
||||
// @ts-ignore
|
||||
const nodeData = getDataById(id)
|
||||
|
||||
Reference in New Issue
Block a user