From b710f6a5df0833d2efd66190e0970f25efa46911 Mon Sep 17 00:00:00 2001 From: QM303176530 <303176530@qq.com> Date: Mon, 26 Oct 2020 20:57:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BF=AB=E6=8D=B7=E9=94=AE?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E7=B2=98=E8=B4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/gva-wfd/behavior/deleteItem.js | 15 +- .../workflowCreate/workflowCreate.vue | 294 +++++++++++++++--- 2 files changed, 264 insertions(+), 45 deletions(-) diff --git a/web/src/components/gva-wfd/behavior/deleteItem.js b/web/src/components/gva-wfd/behavior/deleteItem.js index 273d0fd7..0cfc5b17 100644 --- a/web/src/components/gva-wfd/behavior/deleteItem.js +++ b/web/src/components/gva-wfd/behavior/deleteItem.js @@ -11,6 +11,7 @@ export default function(G6) { onKeydown(e) { const items = this.graph.get('selectedItems'); const focus = this.graph.get('focusGraphWrapper'); + console.log(e.keyCode) if (e.keyCode === 46 && items && items.length > 0 && focus) { if (this.graph.executeCommand) { this.graph.executeCommand('delete', {}); @@ -31,9 +32,19 @@ export default function(G6) { if (this.graph.executeCommand) { this.graph.executeCommand('redo', {}); } - } - + if (e.ctrlKey == true && e.keyCode == 67) { //Ctrl+c + e.returnvalue = false; + if (this.graph.executeCommand) { + this.graph.executeCommand('copy', {}); + } + } + if (e.ctrlKey == true && e.keyCode == 86) { //Ctrl+v + e.returnvalue = false; + if (this.graph.executeCommand) { + this.graph.executeCommand('paste', {}); + } + } }, onCanvasLeave(e) { this.graph.set('focusGraphWrapper', false); diff --git a/web/src/view/workflow/workflowCreate/workflowCreate.vue b/web/src/view/workflow/workflowCreate/workflowCreate.vue index 8cfe04ab..5b1f5f6b 100644 --- a/web/src/view/workflow/workflowCreate/workflowCreate.vue +++ b/web/src/view/workflow/workflowCreate/workflowCreate.vue @@ -1,58 +1,266 @@ \ No newline at end of file