From b8e1395f02c929eaa96b949cf6027ee2a43856a6 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 06 九月 2022 19:03:37 +0800
Subject: [PATCH] 2022-09-06

---
 src/tabviews/commontable/index.jsx |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx
index 14f6e16..b861521 100644
--- a/src/tabviews/commontable/index.jsx
+++ b/src/tabviews/commontable/index.jsx
@@ -341,6 +341,15 @@
             col.linkThdMenu = ''
           }
 
+          if (col.type === 'number') {
+            col.decimal = col.decimal || 0
+            col.round = Math.pow(10, col.decimal)
+
+            if (col.format === 'percent') {
+              col.decimal = col.decimal > 2 ? col.decimal - 2 : 0
+            }
+          }
+
           col.nameField && _arrField.push(col.nameField) // 閾炬帴鍚嶅瓧娈�
           if (col.Hide !== 'true' && col.type === 'number' && col.sum === 'true') {
             statFields.push(col)

--
Gitblit v1.8.0