From 30273c297c59887434f44a75df75f13db6c8885c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 29 九月 2020 09:15:54 +0800
Subject: [PATCH] 2020-09-29

---
 src/menu/actioncomponent/index.jsx |   65 +-------------------------------
 1 files changed, 3 insertions(+), 62 deletions(-)

diff --git a/src/menu/actioncomponent/index.jsx b/src/menu/actioncomponent/index.jsx
index ea88b06..599b4c2 100644
--- a/src/menu/actioncomponent/index.jsx
+++ b/src/menu/actioncomponent/index.jsx
@@ -464,32 +464,12 @@
           })
         }
       }).then(() => {
-        // 鍒ゆ柇鏄惁瀛樺湪鎿嶄綔鍒�
-        let _hasGridbtn = _actionlist.filter(act => act.position === 'grid').length > 0
-        let _gridBtn = config.gridBtn ? fromJS(config.gridBtn).toJS() : null
-
-        if (_gridBtn) {
-          _gridBtn.display = _hasGridbtn
-        } else {
-          _gridBtn = {
-            display: _hasGridbtn,
-            Align: 'center',
-            IsSort: 'false',
-            uuid: Utils.getuuid(),
-            label: this.state.dict['model.form.column.action'],
-            type: 'action',
-            style: 'button',
-            show: 'horizontal',
-            Width: 120
-          }
-        }
-
         this.setState({
           actionlist: _actionlist,
           copying: false,
           visible: false
         }, () => {
-          this.props.updateaction({...config, action: _actionlist, gridBtn: _gridBtn}, copyActionId)
+          this.props.updateaction({...config, action: _actionlist}, copyActionId)
         })
       })
     })
@@ -686,25 +666,6 @@
 
         _actionlist = _actionlist.filter(item => item.uuid !== card.uuid)
 
-        let _hasGridbtn = _actionlist.filter(act => act.position === 'grid').length > 0
-        let _gridBtn = config.gridBtn ? fromJS(config.gridBtn).toJS() : null
-
-        if (_gridBtn) {
-          _gridBtn.display = _hasGridbtn
-        } else {
-          _gridBtn = {
-            display: _hasGridbtn,
-            Align: 'center',
-            IsSort: 'false',
-            uuid: Utils.getuuid(),
-            label: this.state.dict['model.form.column.action'],
-            type: 'action',
-            style: 'button',
-            show: 'horizontal',
-            Width: 120
-          }
-        }
-
         let delcard = {
           type: 'action',
           card: card
@@ -713,7 +674,7 @@
         _this.setState({
           actionlist: _actionlist
         }, () => {
-          _this.props.updateaction({...config, action: _actionlist, gridBtn: _gridBtn}, '', delcard)
+          _this.props.updateaction({...config, action: _actionlist}, '', delcard)
         })
       },
       onCancel() {}
@@ -895,30 +856,10 @@
         this.refs.btnCreatFunc.exec(btn.innerFunc, newLText, DelText).then(result => {
           if (result !== 'success') return
 
-          // 鍒ゆ柇鏄惁瀛樺湪鎿嶄綔鍒�
-          let _hasGridbtn = _actionlist.filter(act => act.position === 'grid').length > 0
-          let _gridBtn = config.gridBtn ? fromJS(config.gridBtn).toJS() : null
-
-          if (_gridBtn) {
-            _gridBtn.display = _hasGridbtn
-          } else {
-            _gridBtn = {
-              display: _hasGridbtn,
-              Align: 'center',
-              IsSort: 'false',
-              uuid: Utils.getuuid(),
-              label: this.state.dict['model.form.column.action'],
-              type: 'action',
-              style: 'button',
-              show: 'horizontal',
-              Width: 120
-            }
-          }
-
           this.setState({
             actionlist: _actionlist
           }, () => {
-            this.props.updateaction({...config, action: _actionlist, gridBtn: _gridBtn})
+            this.props.updateaction({...config, action: _actionlist})
           })
         })
       })

--
Gitblit v1.8.0