From 03a22ec6f9ad7303d10b4c65bb5bc6fa5cbd448a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 22 十月 2022 23:21:42 +0800
Subject: [PATCH] 2022-10-22

---
 src/menu/components/table/normal-table/index.jsx |   28 +++++++++++++++++++++++++++-
 1 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/src/menu/components/table/normal-table/index.jsx b/src/menu/components/table/normal-table/index.jsx
index 4b65160..8f8f6a3 100644
--- a/src/menu/components/table/normal-table/index.jsx
+++ b/src/menu/components/table/normal-table/index.jsx
@@ -131,7 +131,6 @@
       if (appType === 'mob') {
         _card.search = []
       }
-
       this.setState({
         card: _card
       })
@@ -419,6 +418,33 @@
     this.updateComponent({...card, wrap: res})
   }
 
+  updatecolumn = (config) => {
+    config.absFields = []
+    config.cols.forEach(col => {
+      if (col.type === 'number') {
+        if (col.format === 'abs') {
+          config.absFields.push(col.field)
+        }
+      } else if (col.type === 'colspan' && col.subcols) {
+        col.subcols.forEach(scol => {
+          if (scol.type === 'number') {
+            if (scol.format === 'abs') {
+              config.absFields.push(scol.field)
+            }
+          }
+        })
+      }
+    })
+
+    if (config.absFields.length) {
+      config.absFields = Array.from(new Set(config.absFields))
+    } else {
+      config.absFields = null
+    }
+
+    this.updateComponent(config)
+  }
+
   clickComponent = (e) => {
     if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
       e.stopPropagation()

--
Gitblit v1.8.0