From 6b754cd28c45741a24e7f7193b894e3e386e4af8 Mon Sep 17 00:00:00 2001
From: 李凌 <344137771@qq.com>
Date: Sat, 20 Sep 2025 18:25:51 +0800
Subject: [PATCH] 1

---
 src/utils/index.js |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/utils/index.js b/src/utils/index.js
index 214438f..49b2e1a 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -167,4 +167,9 @@
     return ''
   }
   return str.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/g, '').replace(/&nbsp;/ig, '')
+}
+
+export const formatWithCommas = (num) => {
+  if (num === null || num === undefined || isNaN(num)) return '--';
+  return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
 }
\ No newline at end of file

--
Gitblit v1.9.3