From 945e9b8d58ef8fa6fec1cf2aeaf3892e881c3108 Mon Sep 17 00:00:00 2001
From: yangyin <1850366751@qq.com>
Date: 星期五, 08 十一月 2024 16:34:20 +0800
Subject: [PATCH] Merge branch 'test' of http://47.103.154.90:83/r/WI/Web.V1.0 into test

---
 src/utils/util.ts |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/src/utils/util.ts b/src/utils/util.ts
index 4b07f4e..d92279e 100644
--- a/src/utils/util.ts
+++ b/src/utils/util.ts
@@ -630,6 +630,21 @@
 	return percent;
 };
 
+
+
+/**
+ * 淇濈暀鎸囧畾绮惧害灏忔暟浣嶏紝涓斾笉琛ラ浂
+ * @param num
+ * @param precision
+ * @returns
+ */
+export const toMyFixed = (num, precision) => {
+	if (num == null) return '';
+	if (!precision) return num + '';
+	const factor = Math.pow(10, precision);
+	return Math.round(Number(num) * factor) / factor + '';
+};
+
 /**
  *
  * @param {*} func 闃叉姈鍑芥暟

--
Gitblit v1.9.3