From e9e8b1c7b481415714fff9a0d83099fd5a7d6ff0 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 18 五月 2023 17:25:11 +0800
Subject: [PATCH] 2023-05-18

---
 src/menu/components/share/usercomponent/index.jsx |   50 ++++++++++++++++++++++----------------------------
 1 files changed, 22 insertions(+), 28 deletions(-)

diff --git a/src/menu/components/share/usercomponent/index.jsx b/src/menu/components/share/usercomponent/index.jsx
index 07c968b..8862fa6 100644
--- a/src/menu/components/share/usercomponent/index.jsx
+++ b/src/menu/components/share/usercomponent/index.jsx
@@ -82,36 +82,30 @@
       return item
     })
 
-    _config.cols = _config.cols.map(col => {
-      if (col.type === 'colspan' && col.subcols) {
-        col = this.loopCol(col)
-      } else if (col.type === 'custom' && col.elements) {
-        col.elements = col.elements.map(cell => this.resetElement(cell))
-      } else if (col.type === 'action' && col.elements) {
-        col.elements = col.elements.map(cell => {
-          cell.verify = null
-          return cell
-        })
-      }
-      col.marks = null
-      return col
-    })
+    let loopCol = (cols) => {
+      return cols.map(col => {
+        col.uuid = Utils.getuuid()
+        col.marks = null
+
+        if (col.type === 'colspan' && col.subcols) {
+          col.subcols = loopCol(col.subcols)
+        } else if (col.type === 'custom' && col.elements) {
+          col.elements = col.elements.map(cell => {
+            if (cell.eleType === 'button') {
+              cell.verify = null
+            } else {
+              cell = this.resetElement(cell)
+            }
+            return cell
+          })
+        }
+        return col
+      })
+    }
+
+    _config.cols = loopCol(_config.cols)
 
     return _config
-  }
-
-  loopCol = (col) => {
-    col.subcols = col.subcols.map(c => {
-      if (c.type === 'colspan' && c.subcols) {
-        c = this.loopCol(c)
-      } else if (c.type === 'custom' && c.elements) {
-        c.elements = c.elements.map(cell => this.resetElement(cell))
-      }
-      c.marks = null
-      return c
-    })
-
-    return col
   }
 
   resetElement = (item) => {

--
Gitblit v1.8.0