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/copycomponent/index.jsx |   27 +++++++++++++++++++++++++--
 1 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/src/menu/components/share/copycomponent/index.jsx b/src/menu/components/share/copycomponent/index.jsx
index 74bacff..af234aa 100644
--- a/src/menu/components/share/copycomponent/index.jsx
+++ b/src/menu/components/share/copycomponent/index.jsx
@@ -7,8 +7,8 @@
 
 class CopyComponent extends Component {
   static propTpyes = {
-    btnlog: PropTypes.array,
-    handlelog: PropTypes.func
+    type: PropTypes.string,
+    card: PropTypes.object
   }
 
   trigger = () => {
@@ -24,8 +24,31 @@
         _val.$srcId = srcid
       }
 
+      if (type === 'menucell') {
+        _val.setting.type = 'linkmenu'
+        _val.setting.linkMenuId = ''
+        _val.setting.copyMenuId = ''
+      } else if (_val.type === 'menubar' && _val.subtype === 'menubar') {
+        let cell = _val.subMenus[0]
+        _val.subMenus = []
+
+        if (cell) {
+          cell.setting.type = 'menu'
+          cell.setting.linkMenuId = ''
+          cell.setting.copyMenuId = ''
+
+          _val.subMenus.push(cell)
+        }
+      } else if (['normaltable', 'editable', 'basetable'].includes(type)) {
+        _val.action = _val.action.filter(item => !item.origin)
+        _val.cols = _val.cols.filter(item => !item.origin)
+        _val.search = _val.search.filter(item => !item.origin)
+        delete _val.isNew
+      }
+
       _val = window.btoa(window.encodeURIComponent(JSON.stringify(_val)))
     } catch (e) {
+      console.warn(e)
       message.warning('澶嶅埗澶辫触锛岃閲嶈瘯锛�')
       _val = ''
     }

--
Gitblit v1.8.0