diff --git a/components/canvas/CanvasWorkspace.tsx b/components/canvas/CanvasWorkspace.tsx index b97ea0e03..9ce2e24d8 100644 --- a/components/canvas/CanvasWorkspace.tsx +++ b/components/canvas/CanvasWorkspace.tsx @@ -228,22 +228,20 @@ export function CanvasWorkspace() { onMouseLeave={handleMouseUp} onWheel={handleWheel} > - {/* 点阵背景 - 浅色模式 */} + {/* 点阵背景 - 浅色模式(固定大小,不随缩放变化) */}
- {/* 深色模式点阵 */} + {/* 深色模式点阵(固定大小,不随缩放变化) */}
diff --git a/components/canvas/nodes/ImageNode.tsx b/components/canvas/nodes/ImageNode.tsx index 5f6199cd3..ca5cab573 100644 --- a/components/canvas/nodes/ImageNode.tsx +++ b/components/canvas/nodes/ImageNode.tsx @@ -46,6 +46,7 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) { const [resizeHeight, setResizeHeight] = useState(1024); const [isUploading, setIsUploading] = useState(false); const [annotatorOpen, setAnnotatorOpen] = useState(false); + const [fullscreenPreviewOpen, setFullscreenPreviewOpen] = useState(false); // 文件输入的 ref const fileInputRef = useRef(null); @@ -417,13 +418,17 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) { onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => setIsHovered(false)} > - {/* 图片内容 - 使用 object-contain 保持原始比例 */} + {/* 图片内容 - 使用 object-contain 保持原始比例,双击可放大查看 */} {data.src ? ( {data.prompt { + e.stopPropagation(); + setFullscreenPreviewOpen(true); + }} /> ) : data.status === 'generating' ? (
@@ -797,6 +802,38 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) { onCancel={() => setAnnotatorOpen(false)} /> )} + + {/* 双击放大预览弹窗 */} + {fullscreenPreviewOpen && data.src && createPortal( +
setFullscreenPreviewOpen(false)} + > + {/* 关闭按钮 */} + + + {/* 图片 */} + {data.prompt e.stopPropagation()} + /> + + {/* 底部提示 */} +
+ 点击任意位置关闭 +
+
, + document.body + )} ); }