From 5e871a4164869bac7927ea6884dbadd650b1cadf Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 25 五月 2023 11:25:28 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/tabviews/custom/components/share/normalTable/index.jsx |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx
index 33d8d9b..4922254 100644
--- a/src/tabviews/custom/components/share/normalTable/index.jsx
+++ b/src/tabviews/custom/components/share/normalTable/index.jsx
@@ -340,7 +340,16 @@
           // eslint-disable-next-line
           content = eval(content)
         } catch (e) {
+          if (window.debugger) {
+            console.info(content)
+            console.warn(e)
+          }
           content = ''
+        }
+
+        if (col.round && typeof(content) === 'number') {
+          content = Math.round(content * col.round) / col.round
+          content = content.toFixed(col.decimal)
         }
       }
 
@@ -375,14 +384,6 @@
         style = {...style, ...col.style}
       }
 
-      resProps.children = (
-        <CardCellComponent data={record} cards={config} elements={col.elements}/>
-      )
-    } else if (col.type === 'action') {
-      style.padding = '0px'
-      if (col.style) {
-        style = {...style, ...col.style}
-      }
       resProps.children = (
         <CardCellComponent data={record} cards={config} elements={col.elements}/>
       )
@@ -477,7 +478,7 @@
               onCell: record => ({
                 record,
                 col: item,
-                config: item.type === 'custom' || item.type === 'action' ? {setting, columns: fields} : null,
+                config: item.type === 'custom' ? {setting, columns: fields} : null,
                 triggerLink: this.triggerLink
               })
             }

--
Gitblit v1.8.0