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/menu/components/table/base-table/index.jsx |   42 +++++++-----------------------------------
 1 files changed, 7 insertions(+), 35 deletions(-)

diff --git a/src/menu/components/table/base-table/index.jsx b/src/menu/components/table/base-table/index.jsx
index 30ad6c2..e301f10 100644
--- a/src/menu/components/table/base-table/index.jsx
+++ b/src/menu/components/table/base-table/index.jsx
@@ -99,39 +99,6 @@
     MKEmitter.removeListener('completeSave', this.completeSave)
   }
 
-  // updateFix = (card) => {
-  //   let fixs = {}
-
-  //   card.cols.forEach(col => {
-  //     if (!col.field) return
-  //     if (col.postfix || col.prefix) {
-  //       fixs[col.field] = col
-  //     }
-  //   })
-
-  //   card.cols.forEach(col => {
-  //     if (col.type === 'custom') {
-  //       col.elements.forEach(cell => {
-  //         if (cell.datatype === 'dynamic') {
-  //           cell.height = ''
-  //           cell.innerHeight = 'auto'
-
-  //           if (fixs[cell.field]) {
-  //             if (!cell.prefix && fixs[cell.field].prefix) {
-  //               cell.prefix = fixs[cell.field].prefix
-  //             }
-  //             if (!cell.postfix && fixs[cell.field].postfix) {
-  //               cell.postfix = fixs[cell.field].postfix
-  //             }
-  //           }
-  //         }
-  //       })
-  //     }
-  //   })
-
-  //   return card
-  // }
-
   completeSave = () => {
     const { card } = this.state
 
@@ -255,8 +222,13 @@
     let _actions = [...action]
 
     cols.forEach(col => {
-      if (col.type !== 'action') return
-      _actions.push(...col.elements)
+      if (col.type === 'custom') {
+        col.elements.forEach(cell => {
+          if (cell.eleType !== 'button') return
+
+          _actions.push(cell)
+        })
+      }
     })
 
     return getWrapForm(wrap, _actions, columns)

--
Gitblit v1.8.0