From aa5f27bec73a5c36a9f5baf612ed8a3ed177bcc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E7=8B=97?= <909275705@qq.com> Date: Sun, 8 Oct 2023 08:26:07 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20floatToFixed2=20=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E6=9F=90=E4=BA=9B=E6=83=85=E5=86=B5=E4=B8=8B=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E7=BB=93=E6=9E=9C=E4=B8=BA=E9=9B=B6=20=20Closes=20#I8?= =?UTF-8?q?671C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 风狗 <909275705@qq.com> --- src/utils/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/index.ts b/src/utils/index.ts index c73b8d2f..b37883f3 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -205,6 +205,9 @@ export const floatToFixed2 = (num: number | string | undefined): string => { case 1: str = f.toString() + '0' break + case 2: + str = f.toString() + break } return str }