From cb9ade2afd2a367ad767bc605ab7086c695dd010 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 09 十二月 2022 15:53:32 +0800
Subject: [PATCH] 2022-12-09

---
 src/menu/components/share/pastecomponent/index.jsx |   30 +++---------------------------
 1 files changed, 3 insertions(+), 27 deletions(-)

diff --git a/src/menu/components/share/pastecomponent/index.jsx b/src/menu/components/share/pastecomponent/index.jsx
index b0c79bb..cb1bb7b 100644
--- a/src/menu/components/share/pastecomponent/index.jsx
+++ b/src/menu/components/share/pastecomponent/index.jsx
@@ -25,15 +25,8 @@
     this.setState({visible: true})
   }
 
-  resetconfig = (item, copyBtns, config) => {
+  resetconfig = (item, config) => {
     let _uuid = Utils.getuuid()
-
-    if (item.OpenType === 'popview') {
-      let _cell = fromJS(item).toJS()
-      _cell.$originUuid = _cell.uuid
-      _cell.uuid = _uuid
-      copyBtns.set(_uuid, _cell)
-    }
 
     if (item.uuid) {
       item.uuid = _uuid
@@ -109,14 +102,7 @@
           })
         } else if (_item.type === 'action' && _item.elements) {
           _item.elements = _item.elements.map(cell => {
-            let _uuid = Utils.getuuid()
-            if (cell.OpenType === 'popview') {
-              let _cell = fromJS(cell).toJS()
-              _cell.$originUuid = _cell.uuid
-              _cell.uuid = _uuid
-              copyBtns.set(_uuid, _cell)
-            }
-            cell.uuid = _uuid
+            cell.uuid = Utils.getuuid()
             return cell
           })
         }
@@ -138,25 +124,15 @@
 
       let type = res.copyType
       let config = fromJS(this.props.config).toJS()
-      let copyBtns = new Map()
 
-      res = this.resetconfig(res, copyBtns, config)
+      res = this.resetconfig(res, config)
       delete res.copyType
-
-      copyBtns = [...copyBtns.values()]
-
-      if (copyBtns.length > 0) {
-        MKEmitter.emit('copyButtons', copyBtns)
-      }
 
       if (config.type === 'form') {
         this.props.updateConfig(res)
         this.setState({visible: false})
         return
       } else if (type === 'action') {
-        config.action = config.action || []
-        config.action = config.action.filter(item => !item.origin)
-
         if (['line', 'bar', 'scatter'].includes(config.type) && !['excelOut', 'excelIn'].includes(res.OpenType)) {
           notification.warning({ top: 92, message: '鍥捐〃涓笉鏀寔姝ょ被鎸夐挳锛�', duration: 5 })
           return

--
Gitblit v1.8.0