import React from 'react'; interface NodeContextMenuProps { visible: boolean; position: { x: number; y: number }; nodeId: string | null; onReplaceNode: () => void; } export const NodeContextMenu: React.FC = ({ visible, position, onReplaceNode }) => { if (!visible) return null; return (
e.stopPropagation()} >
e.currentTarget.style.backgroundColor = '#094771'} onMouseLeave={(e) => e.currentTarget.style.backgroundColor = 'transparent'} > 替换节点
); };