From eb0482b3fc2e91a626baa6ac73e75e0b0038f552 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 03 十一月 2023 01:25:59 +0800
Subject: [PATCH] 2023-11-03

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

diff --git a/src/menu/components/table/edit-table/columns/index.jsx b/src/menu/components/table/edit-table/columns/index.jsx
index e30df79..e6e92ee 100644
--- a/src/menu/components/table/edit-table/columns/index.jsx
+++ b/src/menu/components/table/edit-table/columns/index.jsx
@@ -16,6 +16,7 @@
 const EditColumn = asyncComponent(() => import('./editColumn'))
 const TableVerify = asyncComponent(() => import('./tableIn'))
 const MarkColumn = asyncIconComponent(() => import('@/menu/components/share/markcomponent'))
+const ColsControl = asyncIconComponent(() => import('@/menu/components/share/colsControl'))
 const CardCellComponent = asyncComponent(() => import('@/menu/components/card/cardcellcomponent'))
 const PasteComponent = asyncIconComponent(() => import('@/components/paste'))
 
@@ -249,13 +250,7 @@
   }
 
   shouldComponentUpdate (nextProps, nextState) {
-    const { config } = this.props
-
-    return !is(fromJS(this.state), fromJS(nextState)) ||
-      !is(fromJS(config.wrap), fromJS(nextProps.config.wrap)) ||
-      !is(fromJS(config.submit), fromJS(nextProps.config.submit)) ||
-      !is(fromJS(config.action), fromJS(nextProps.config.action)) ||
-      config.setting.laypage !== nextProps.config.setting.laypage
+    return !is(fromJS(this.state), fromJS(nextState)) || !is(fromJS(this.props.config), fromJS(nextProps.config))
   }
 
   moveCol = (dragIndex, hoverIndex) => {
@@ -411,6 +406,8 @@
 
   submitCol = (col) => {
     const { card } = this.state
+    
+    if (!card) return
     
     col.uuid = card.uuid
     col.isSub = card.isSub === true
@@ -696,6 +693,7 @@
           </Popover>
           <CopyOutlined title="澶嶅埗鏄剧ず鍒�" onClick={this.copycolumn} />
           <MarkColumn columns={fields} type="line" marks={lineMarks} onSubmit={this.updateLineMarks} />
+          <ColsControl config={config} onSubmit={this.props.updatecolumn}/>
           <FileSyncOutlined title="鍚屾瀛楁闆�" onClick={this.syncfield} />
           <DeleteOutlined title="娓呯┖鏄剧ず鍒�" onClick={this.clear}/>
         </div>
@@ -718,11 +716,11 @@
             }}
           />
         </DndProvider>
-        <EditColumn column={card} columns={this.state.columns} fields={fields} submitCol={this.submitCol} cancelCol={this.cancelCol}/>
+        <EditColumn column={card} wrap={config.wrap} columns={this.state.columns} fields={fields} submitCol={this.submitCol} cancelCol={this.cancelCol}/>
         <Modal
           wrapClassName="mk-pop-modal"
           visible={visible}
-          width={'80vw'}
+          width={'90vw'}
           maskClosable={false}
           onOk={this.verifySubmit}
           onCancel={() => { this.setState({ visible: false }) }}

--
Gitblit v1.8.0