From 66bcf066e0965da87df581d0869a45d3b34eac02 Mon Sep 17 00:00:00 2001 From: MTrun <1262327911@qq.com> Date: Fri, 28 Jan 2022 20:54:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BA=A6=E6=9D=9F=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E7=BC=A9=E6=94=BE=E7=9A=84=E6=9C=80=E5=A4=A7=E6=AF=94=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/chartEditStore/chartEditStore.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store/modules/chartEditStore/chartEditStore.ts b/src/store/modules/chartEditStore/chartEditStore.ts index 9b7e1459..a95b01dc 100644 --- a/src/store/modules/chartEditStore/chartEditStore.ts +++ b/src/store/modules/chartEditStore/chartEditStore.ts @@ -133,13 +133,13 @@ export const useChartEditStoreStore = defineStore({ const scaleWidth = parseFloat( ((height * baseProportion) / editCanvasWidth).toFixed(5) ) - this.setScale(parseFloat(scaleWidth.toFixed(5))) + this.setScale( scaleWidth > 1 ? 1 : scaleWidth) } else { // 表示更高 const scaleHeight = parseFloat( (width / baseProportion / editCanvasHeight).toFixed(5) ) - this.setScale(parseFloat(scaleHeight.toFixed(5))) + this.setScale(scaleHeight > 1 ? 1 : scaleHeight) } } else { window['$message'].warning('请先创建画布,再进行缩放')