From 2c29c2ef08c505bc1ee31136ed0c1b5046df08ff Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 29 Dec 2025 23:59:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B0=BA=E5=AF=B8=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E7=95=8C=E9=9D=A2=E5=B8=83=E5=B1=80=E5=92=8C=E5=B0=BA?= =?UTF-8?q?=E5=AF=B8=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将宽高设置工具栏移动到选择比例工具栏后面,统一在一行显示 - 左侧原图预览固定高度570px,按比例显示 - 右侧画布线框固定尺寸714x570px,减少上下留白 - 优化工具栏布局,所有控制项在一行显示,更紧凑 --- components/image-annotator.tsx | 172 +++++++++++++++++---------------- 1 file changed, 89 insertions(+), 83 deletions(-) diff --git a/components/image-annotator.tsx b/components/image-annotator.tsx index d4dc37e..1662c91 100644 --- a/components/image-annotator.tsx +++ b/components/image-annotator.tsx @@ -1031,88 +1031,93 @@ export function ImageAnnotator({ imageUrl, onConfirm, onCancel }: ImageAnnotator {isResizeMode ? ( /* 尺寸调整模式下显示尺寸调整工具栏 */
- {/* 比例选择 */} -
- -
- {aspectRatios.map((ratio) => ( -
- {ratio.label} - - ))} +
1 ? "24px" : ratio.ratio && ratio.ratio < 1 ? "12px" : "16px", + height: ratio.value === "smart" ? "16px" : ratio.ratio && ratio.ratio > 1 ? "12px" : ratio.ratio && ratio.ratio < 1 ? "24px" : "16px", + }} + > + {ratio.value === "smart" && ( + + )} +
+ {ratio.label} + + ))} +
- - - {/* 尺寸输入 */} -
-
- - handleWidthChange(Number.parseInt(e.target.value) || 1)} - className="w-24 h-8" - min={1} - max={10000} - /> - px -
-
- - handleHeightChange(Number.parseInt(e.target.value) || 1)} - className="w-24 h-8" - min={1} - max={10000} - /> - px -
-
- - setResizeBackgroundColor(e.target.value)} - disabled={resizeBackgroundTransparent} - className="w-12 h-8 rounded border cursor-pointer disabled:opacity-50" - /> -
-
-