From 0985744184f87bf15e2049944cbe03cb90e70ced Mon Sep 17 00:00:00 2001 From: huang <1724659546@qq.com> Date: Thu, 27 Nov 2025 18:39:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/format.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/format.js b/src/utils/format.js index 0ea2a565..5854bb42 100644 --- a/src/utils/format.js +++ b/src/utils/format.js @@ -44,7 +44,8 @@ export function formatChangeAmount(changeAmount) { return '--'; } - const sign = changeAmount > 0 ? '+' : ''; + // 明确处理正号、负号和零 + const sign = changeAmount > 0 ? '+' : (changeAmount < 0 ? '-' : ''); const absoluteAmount = Math.abs(changeAmount); if (absoluteAmount >= 1000) {