From dbed4020c038c673218afbd0b2cc8010ef55456a Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 2 Feb 2026 11:07:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9B=BE=E7=89=87=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E6=A0=8F=E6=94=B9=E4=B8=BA=E7=BA=AF=E5=9B=BE=E6=A0=87=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C=E6=82=AC=E5=81=9C=E6=98=BE=E7=A4=BA=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除工具栏按钮的文字标签,只显示图标 - 使用 Tooltip 组件在鼠标悬停时显示功能名称 - 将下载和删除按钮从下拉菜单移到工具栏直接显示 - 工具栏更紧凑,视觉更简洁 --- components/canvas/nodes/ImageNode.tsx | 313 ++++++++++++++------------ 1 file changed, 171 insertions(+), 142 deletions(-) diff --git a/components/canvas/nodes/ImageNode.tsx b/components/canvas/nodes/ImageNode.tsx index c047b66..6033881 100644 --- a/components/canvas/nodes/ImageNode.tsx +++ b/components/canvas/nodes/ImageNode.tsx @@ -20,6 +20,7 @@ import { } from "@/components/ui/dialog"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; +import { Tooltip, TooltipContent, TooltipTrigger, TooltipProvider } from "@/components/ui/tooltip"; import { toast } from "sonner"; import { useCanvasStore } from "@/store/canvas"; import { imageGenerationService } from "@/services/canvas"; @@ -594,150 +595,178 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) { {/* 工具栏使用 Portal 渲染到 body,避免被裁剪 */} {isSelected && data.src && !isProcessing && typeof document !== 'undefined' && createPortal( -
e.stopPropagation()} - > - {/* 🆕 添加到对话 */} - - - {/* 分隔线 */} -
- - {/* 放大/高清 */} - - - {/* 移除背景/抠图 */} - - - {/* 场景融合 */} - - - {/* 角度编辑 */} - - - {/* 扩展 */} - - - {/* 尺寸调整 */} - - - {/* 图片标注 */} - - - {/* 更多操作 */} - - - - - - - - 下载图片 - - - deleteNode(node.id)} - className="text-destructive focus:text-destructive" - > - - 删除 - - - -
, + {/* 添加到对话 */} + + + + + 添加到对话 + + + {/* 分隔线 */} +
+ + {/* 放大/高清 */} + + + + + 高清放大 + + + {/* 移除背景/抠图 */} + + + + + 移除背景 + + + {/* 场景融合 */} + + + + + 场景融合 + + + {/* 角度编辑 */} + + + + + 角度编辑 + + + {/* 扩展 */} + + + + + 图片扩展 + + + {/* 尺寸调整 */} + + + + + 尺寸调整 + + + {/* 图片标注 */} + + + + + 标注重点区域 + + + {/* 下载 */} + + + + + 下载图片 + + + {/* 删除 */} + + + + + 删除 + +
+ , document.body )}