chore(flow): 移除调试日志和冗余配置

master
钟良源 3 months ago
parent aaa568f9a5
commit 03976ab0cc

@ -480,7 +480,6 @@ export const useFlowCallbacks = (
};
localStorage.setItem('copiedNode', JSON.stringify(nodeData));
console.log('复制节点:', node);
}, [initialData?.appId]);
// 粘贴节点

@ -206,8 +206,6 @@ const FlowEditorMain: React.FC<FlowEditorMainProps> = (props) => {
return !isRunning; // 运行时禁止删除节点
}}
onNodesDelete={(deleted) => {
console.log('deleted:', deleted);
// 检查是否有循环节点
const loopNodes = deleted.filter(node =>
node.data?.type === 'LOOP_START' || node.data?.type === 'LOOP_END'
@ -298,10 +296,6 @@ const FlowEditorMain: React.FC<FlowEditorMainProps> = (props) => {
fitView
selectionOnDrag={!isRunning} // 运行时禁用拖拽选择
selectionMode={!isRunning ? SelectionMode.Partial : undefined} // 运行时禁用选择模式
panOnDrag={!isRunning ? [0, 1, 2] : []} // 运行时禁用拖拽平移
zoomOnScroll={!isRunning} // 运行时禁用滚轮缩放
zoomOnPinch={!isRunning} // 运行时禁用捏合缩放
panOnScrollSpeed={!isRunning ? 0.5 : 0} // 运行时禁用滚动平移
>
<Background />
<Panel position="top-left">

@ -75,8 +75,7 @@ function IDEContainer() {
console.error('WebSocket错误:', event);
},
onMessage: (event) => {
console.log('收到WebSocket消息:', event.data);
// 这里可以处理从后端收到的消息,例如日志更新等
// console.log('收到WebSocket消息:', event.data);
const socketMessage = JSON.parse(event.data);
if (socketMessage?.socketId) dispatch(updateSocketId(socketMessage.socketId));

Loading…
Cancel
Save