From e603c97dbe7a4f1dbd6445e00383ed651182e0fe Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 03 三月 2020 17:09:11 +0800
Subject: [PATCH] 2020-03-03

---
 src/templates/tableshare/dragelement/index.jsx |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/templates/tableshare/dragelement/index.jsx b/src/templates/tableshare/dragelement/index.jsx
index 12a0f89..7737c7a 100644
--- a/src/templates/tableshare/dragelement/index.jsx
+++ b/src/templates/tableshare/dragelement/index.jsx
@@ -48,12 +48,32 @@
   const copyCard = id => {
     const { card } = findCard(id)
     let copycard = JSON.parse(JSON.stringify(card))
+
     copycard.uuid = Utils.getuuid()
     copycard.origin = false
     copycard.label = copycard.label + '(copy)'
     copycard.focus = true
 
     copycard.originCard = card
+    
+    let _val = ''
+
+    try {
+      copycard.copyType = 'action'
+      _val = window.btoa(window.encodeURIComponent(JSON.stringify(copycard)))
+    } catch {
+      console.warn('Stringify Failure')
+      _val = ''
+    }
+
+    if (_val) {
+      let oInput = document.createElement('input')
+      oInput.value = _val
+      document.body.appendChild(oInput)
+      oInput.select()
+      document.execCommand('Copy')
+      document.body.removeChild(oInput)
+    }
 
     copyElement(copycard)
   }

--
Gitblit v1.8.0