From c36d0f93d88b6f6a63413ec68efc642de255e04f Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 18 Jan 2026 15:02:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9B=BE=E7=89=87=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8=E5=85=A5=E5=8F=A3=E4=BC=98=E5=8C=96=20-=20=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E8=BF=9B=E5=85=A5=E7=BC=96=E8=BE=91=E5=99=A8=E4=B8=BB?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 点击图片编辑器按钮后直接显示完整编辑器界面(包含工具栏) - 在画布区域显示上传区域,而非独立的上传窗口 - 保持拖拽、点击、粘贴上传功能 --- components/image-annotator.tsx | 75 ++++++++++++---------------------- 1 file changed, 25 insertions(+), 50 deletions(-) diff --git a/components/image-annotator.tsx b/components/image-annotator.tsx index a44aa3b7a..4deb1be7a 100644 --- a/components/image-annotator.tsx +++ b/components/image-annotator.tsx @@ -1551,6 +1551,31 @@ export function ImageAnnotator({ imageUrl, onConfirm, onCancel, initialResizeMod 正在加载图片... + ) : !image ? ( + /* 没有图片时显示上传区域 */ +
+
fileInputRef.current?.click()} + onDrop={handleDrop} + onDragOver={handleDragOver} + > +
+ +
+

上传图片以开始编辑

+

拖拽图片到此处、点击选择或 Ctrl+V 粘贴

+

支持 JPG, PNG, WebP 格式,最大 10MB

+ + +
+
) : isResizeMode ? ( /* 尺寸调整模式 - 左右对比布局 */ <> @@ -1728,55 +1753,5 @@ export function ImageAnnotator({ imageUrl, onConfirm, onCancel, initialResizeMod return null; } - // 如果没有图片,显示上传界面 - if (!originalImageUrl) { - return createPortal( -
-
- {/* Header */} -
-
- 图片编辑器 -
- -
- - {/* Upload Area */} -
-
fileInputRef.current?.click()} - onDrop={handleDrop} - onDragOver={handleDragOver} - > -
- -
-

上传图片以开始编辑

-

拖拽图片到此处、点击选择或 Ctrl+V 粘贴

-

支持 JPG, PNG, WebP 格式,最大 10MB

- - -
-
-
-
, - document.body - ); - } - return createPortal(modalContent, document.body); }