From 6250c2446efc89d0e9fb48f070f510fcbf8a30b9 Mon Sep 17 00:00:00 2001 From: mwq <82371562+mawenqing1@users.noreply.github.com> Date: Wed, 3 Apr 2024 14:31:06 +0800 Subject: [PATCH] Update Functional.vue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: 利用鼠标滚轮缩小图片时缩放值为负数导致图片翻转 --- src/components/Preview/src/Functional.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/Preview/src/Functional.vue b/src/components/Preview/src/Functional.vue index 1c9192978..0abdb3c36 100644 --- a/src/components/Preview/src/Functional.vue +++ b/src/components/Preview/src/Functional.vue @@ -143,6 +143,9 @@ function scaleFunc(num: number) { if (imgState.imgScale <= 0.2 && num < 0) return; imgState.imgScale += num; + if (imgState.imgScale <= 0) { + imgState.imgScale = 0.2; + } } // 旋转图片