feat(web): 实现循环节点中新增节点

This commit is contained in:
2025-07-14 23:12:43 +08:00
parent c7e0b56850
commit fa06207af8
5 changed files with 92 additions and 58 deletions

View File

@@ -3,14 +3,15 @@ import {classnames} from 'amis'
import React from 'react'
import {flowBackgroundColor, flowDotColor} from '../types.ts'
import AmisNode, {nodeClassName, NormalNodeHandler} from './AmisNode.tsx'
import AddNodeButton from '../component/AddNodeButton.tsx'
const LoopNode = (props: NodeProps) => {
return (
<AmisNode
className={classnames('w-full', 'h-full', nodeClassName('loop'))}
style={{
minWidth: '256px',
minHeight: '110px'
minWidth: '350px',
minHeight: '200px'
}}
nodeProps={props}
extraNodeDescription={
@@ -32,12 +33,13 @@ const LoopNode = (props: NodeProps) => {
color={flowDotColor}
bgColor={flowBackgroundColor}
/>
<AddNodeButton className="mt-2 ml-2" parentId={props.id}/>
</div>
}
handler={<NormalNodeHandler/>}
resize={{
minWidth: 256,
minHeight: 208,
minWidth: 350,
minHeight: 290,
}}
/>
)