feat(web): 增加分支节点,增加流程检查的测试
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type {NodeProps} from '@xyflow/react'
|
||||
import {Tag} from 'antd'
|
||||
import {each} from 'licia'
|
||||
import type {JSX} from 'react'
|
||||
import React, {type JSX} from 'react'
|
||||
import {horizontalFormOptions} from '../../../../util/amis.tsx'
|
||||
import AmisNode from './AmisNode.tsx'
|
||||
|
||||
@@ -18,7 +18,7 @@ const StartNode = (props: NodeProps) => AmisNode({
|
||||
defaultNodeDescription: '定义输入变量',
|
||||
extraNodeDescription: nodeData => {
|
||||
const variables: JSX.Element[] = []
|
||||
const inputs = (nodeData['inputs'] ?? {}) as Record<string, { type: string, description: string }>
|
||||
const inputs = (nodeData?.inputs ?? {}) as Record<string, { type: string, description: string }>
|
||||
each(inputs, (value, key) => {
|
||||
variables.push(
|
||||
<div className="mt-1 flex justify-between" key={key}>
|
||||
@@ -65,4 +65,4 @@ const StartNode = (props: NodeProps) => AmisNode({
|
||||
],
|
||||
})
|
||||
|
||||
export default StartNode
|
||||
export default React.memo(StartNode)
|
||||
Reference in New Issue
Block a user