From e6a10ced1ed8db39486dc0a1795191c701ef3224 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 20 十二月 2021 18:11:35 +0800
Subject: [PATCH] 2021-12-20

---
 src/menu/components/table/edit-table/index.jsx |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/menu/components/table/edit-table/index.jsx b/src/menu/components/table/edit-table/index.jsx
index 09982b8..9eb9941 100644
--- a/src/menu/components/table/edit-table/index.jsx
+++ b/src/menu/components/table/edit-table/index.jsx
@@ -81,6 +81,10 @@
         _card.style = config.style
         _card.headerStyle = config.headerStyle
 
+        _card.setting = config.setting
+        _card.columns = config.columns
+        _card.scripts = config.scripts
+
         let oriUids = {}
         _card.action = config.action.map(item => {
           let _uuid = Utils.getuuid()
@@ -201,11 +205,9 @@
   }
 
   addSearch = () => {
-    let card = fromJS(this.state.card).toJS()
+    const { card } = this.state
 
-    card.search.push({uuid: Utils.getuuid(), focus: true, label: 'label', type: 'text', match: '='})
-
-    this.setState({card})
+    MKEmitter.emit('plusSearch', card.uuid, {uuid: Utils.getuuid(), focus: true, label: 'label', type: 'text', match: '='}, 'simple')
   }
 
   addButton = () => {
@@ -309,7 +311,7 @@
 
     return (
       <div className="menu-normal-table-edit-box" style={_style} onClick={this.clickComponent} id={card.uuid}>
-        <NormalHeader defaultshow="hidden" hideSearch="true" config={card} updateComponent={this.updateComponent}/>
+        <NormalHeader hideSearch="true" config={card} updateComponent={this.updateComponent}/>
         <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
           <div className="mk-popover-control">
             <Icon className="plus" title="娣诲姞鍒�" onClick={this.addColumns} type="plus" />

--
Gitblit v1.8.0