refactor(flowEditor): 重构节点数据结构并移除文本更新节点
- 修改基本节点、开始节点和结束节点的数据结构,增加 dataIns、dataOuts、apiIns、apiOuts 字段 - 移除文本更新节点组件和相关样式 - 更新节点类型映射和显示名称映射,删除文本更新节点相关项master
parent
d2b6d8eb10
commit
e49df169a5
@ -1,8 +0,0 @@
|
|||||||
.text-updater-node {
|
|
||||||
//width: 150px;
|
|
||||||
//height: 80px;
|
|
||||||
padding: 20px;
|
|
||||||
border-radius: 15px;
|
|
||||||
border: 1px solid #cccccc;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
import React, { useCallback } from 'react';
|
|
||||||
import style from './TextUpdaterNode.module.less';
|
|
||||||
import { Handle, NodeProps, Position } from '@xyflow/react';
|
|
||||||
|
|
||||||
interface TextUpdaterNodeData {
|
|
||||||
data?: string;
|
|
||||||
id?: string;
|
|
||||||
}
|
|
||||||
const TextUpdaterNode: React.FC<NodeProps> = (props) => {
|
|
||||||
const onChange = useCallback((evt: React.ChangeEvent<HTMLInputElement>) => {
|
|
||||||
console.log(evt.target.value);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className={style['text-updater-node']}>
|
|
||||||
<div>
|
|
||||||
<label htmlFor="text">Text:</label>
|
|
||||||
<input id="text" name="text" onChange={onChange} className="nodrag" />
|
|
||||||
</div>
|
|
||||||
<Handle type="target" position={Position.Left} id="a" />
|
|
||||||
<Handle type="target" position={Position.Bottom} id="a1" />
|
|
||||||
<Handle type="target" position={Position.Top} id="a2" />
|
|
||||||
<Handle type="source" position={Position.Right} id="b" />
|
|
||||||
<Handle type="source" position={Position.Right} style={{ top: 10 }} id="b1" />
|
|
||||||
<Handle type="source" position={Position.Right} style={{ top: 20 }} id="b2" />
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default TextUpdaterNode;
|
|
||||||
Loading…
Reference in New Issue