|
|
|
|
@ -57,7 +57,7 @@ const renderSpecialNodeHandles = (isStartNode: boolean, isEndNode: boolean, data
|
|
|
|
|
id={apiOuts[index].name || `start-output-${index}`}
|
|
|
|
|
style={{
|
|
|
|
|
...handleStyles.mainSource,
|
|
|
|
|
top: `${40 + index * 20}px`
|
|
|
|
|
top: `${45 + index * 20}px`
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
))}
|
|
|
|
|
@ -69,7 +69,7 @@ const renderSpecialNodeHandles = (isStartNode: boolean, isEndNode: boolean, data
|
|
|
|
|
id={dataOuts[index].name || `output-${index}`}
|
|
|
|
|
style={{
|
|
|
|
|
...handleStyles.data,
|
|
|
|
|
top: `${60 + index * 20}px`
|
|
|
|
|
top: `${65 + index * 20}px`
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
))}
|
|
|
|
|
@ -90,7 +90,7 @@ const renderSpecialNodeHandles = (isStartNode: boolean, isEndNode: boolean, data
|
|
|
|
|
id={apiIns[index].name || `end-input-${index}`}
|
|
|
|
|
style={{
|
|
|
|
|
...handleStyles.mainTarget,
|
|
|
|
|
top: `${40 + index * 20}px`
|
|
|
|
|
top: `${45 + index * 20}px`
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
))}
|
|
|
|
|
@ -102,7 +102,7 @@ const renderSpecialNodeHandles = (isStartNode: boolean, isEndNode: boolean, data
|
|
|
|
|
id={dataIns[index].name || `input-${index}`}
|
|
|
|
|
style={{
|
|
|
|
|
...handleStyles.data,
|
|
|
|
|
top: `${60 + index * 20}px`
|
|
|
|
|
top: `${65 + index * 20}px`
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
))}
|
|
|
|
|
@ -130,7 +130,7 @@ const renderRegularNodeHandles = (dataIns: any[], dataOuts: any[], apiIns: any[]
|
|
|
|
|
id={apiOuts[index].name || `output-${index}`}
|
|
|
|
|
style={{
|
|
|
|
|
...handleStyles.mainSource,
|
|
|
|
|
top: `${40 + index * 20}px`
|
|
|
|
|
top: `${45 + index * 20}px`
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
))}
|
|
|
|
|
@ -142,7 +142,7 @@ const renderRegularNodeHandles = (dataIns: any[], dataOuts: any[], apiIns: any[]
|
|
|
|
|
id={apiIns[index].name || `input-${index}`}
|
|
|
|
|
style={{
|
|
|
|
|
...handleStyles.mainTarget,
|
|
|
|
|
top: `${40 + index * 20}px`
|
|
|
|
|
top: `${45 + index * 20}px`
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
))}
|
|
|
|
|
@ -156,7 +156,7 @@ const renderRegularNodeHandles = (dataIns: any[], dataOuts: any[], apiIns: any[]
|
|
|
|
|
id={dataIns[index].name || `input-${index}`}
|
|
|
|
|
style={{
|
|
|
|
|
...handleStyles.data,
|
|
|
|
|
top: `${40 + (index + 1) * 20}px`
|
|
|
|
|
top: `${45 + (index + 1) * 20}px`
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
))}
|
|
|
|
|
@ -170,7 +170,7 @@ const renderRegularNodeHandles = (dataIns: any[], dataOuts: any[], apiIns: any[]
|
|
|
|
|
id={dataOuts[index].name || `output-${index}`}
|
|
|
|
|
style={{
|
|
|
|
|
...handleStyles.data,
|
|
|
|
|
top: `${40 + (index + 1) * 20}px`
|
|
|
|
|
top: `${45 + (index + 1) * 20}px`
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
))}
|
|
|
|
|
@ -206,6 +206,7 @@ const NodeContent = ({ data }: { data: NodeContentData }) => {
|
|
|
|
|
const dataOuts = data.parameters?.dataOuts || [];
|
|
|
|
|
const showFooter = data?.component?.customDef || false;
|
|
|
|
|
const footerData = (showFooter && data.component) || {};
|
|
|
|
|
console.log('apiIns,apiOuts:', apiIns, apiOuts);
|
|
|
|
|
|
|
|
|
|
// 判断节点类型
|
|
|
|
|
const isStartNode = data.type === 'start';
|
|
|
|
|
@ -214,7 +215,30 @@ const NodeContent = ({ data }: { data: NodeContentData }) => {
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
{/*content栏*/}
|
|
|
|
|
{/*content栏-api部分*/}
|
|
|
|
|
<div className={styles['node-content-api']}>
|
|
|
|
|
{apiIns.length > 0 && (
|
|
|
|
|
<div className={styles['node-inputs']}>
|
|
|
|
|
{apiIns.map((input, index) => (
|
|
|
|
|
<div key={`input-${index}`} className={styles['node-input-label']}>
|
|
|
|
|
{input.desc}
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
{apiOuts.length > 0 && (
|
|
|
|
|
<div className={styles['node-outputs-api']}>
|
|
|
|
|
{apiOuts.map((output, index) => (
|
|
|
|
|
<div key={`output-${index}`} className={styles['node-input-label']}>
|
|
|
|
|
{output.desc}
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/*content栏-data部分*/}
|
|
|
|
|
<div className={styles['node-content']}>
|
|
|
|
|
{dataIns.length > 0 && !isStartNode && (
|
|
|
|
|
<div className={styles['node-inputs']}>
|
|
|
|
|
|