From 4a0ddcc0af7fdfbf51ea19bf61e5b00e5a3abc6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BF=97=E9=B9=8F?= <2916022834@qq.com> Date: Thu, 25 Sep 2025 14:12:02 +0800 Subject: [PATCH] 111 --- src/component/Canvas/CanvasEditor/index.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/component/Canvas/CanvasEditor/index.vue b/src/component/Canvas/CanvasEditor/index.vue index 359f350a..6cee3221 100644 --- a/src/component/Canvas/CanvasEditor/index.vue +++ b/src/component/Canvas/CanvasEditor/index.vue @@ -474,7 +474,9 @@ onMounted(async () => { const height = canvasManager.height; const cwidth = props.config.width; const cheight = props.config.height; - setZoom(Math.min(width/cwidth,height/cheight)); // 设置画布缩放 + let zoom = Math.min(1,width/cwidth,height/cheight); + if(zoom < 1) zoom -= 0.05; + setZoom(zoom); // 设置画布缩放 } }); @@ -543,7 +545,7 @@ function resetZoom() { function setZoom(zoom) { setTimeout(()=>{ if (!canvasManager) return; - const newZoom = Math.max(zoom / 1.1, 0.1); // 减少10%,最小0.1倍 + const newZoom = Math.max(zoom, 0.1); // 最小0.1倍 // 使用画布中心作为缩放点 const centerPoint = {