From cea7ef2f8a6b608f31d9ebffdda07c2a336db9c3 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 07 七月 2023 09:24:00 +0800
Subject: [PATCH] 2023-07-07

---
 src/menu/components/table/base-table/index.jsx |   44 +++++++++-----------------------------------
 1 files changed, 9 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..c05c3d4 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)
@@ -275,6 +247,8 @@
     res.drawerPlacement = card.wrap.drawerPlacement || 'right'
     res.searchRatio = card.wrap.searchRatio || 6
     res.searchLwidth = card.wrap.searchLwidth !== undefined ? card.wrap.searchLwidth : 33.3
+    res.borderRadius = card.wrap.borderRadius || 0
+    res.resetContrl = card.wrap.resetContrl || 'init'
 
     this.updateComponent({...card, wrap: res})
   }

--
Gitblit v1.8.0