From 89eb6be64150d3795f5219263958fbc2014a79f9 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Wed, 27 Mar 2024 11:32:36 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E4=BF=AE=E6=94=B9bug83126?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/formatMoney.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/formatMoney.js b/src/utils/formatMoney.js index f4d396d..82ba06b 100644 --- a/src/utils/formatMoney.js +++ b/src/utils/formatMoney.js @@ -9,7 +9,9 @@ export function formatMoney(money) { if (num.indexOf('.') !== -1) { point = num.substring(num.indexOf('.')) num = parseInt(num) - }else { + } else if (num.indexOf('%') === -1) { + point = '.00' + } else { // point = '.00' }