From 8e1106e06032ea48baf8b243eb1d248fc97a54e3 Mon Sep 17 00:00:00 2001 From: smallstonesk <575913857@qq.com> Date: Tue, 10 Nov 2020 10:50:16 +0800 Subject: [PATCH] fix: clipboard supports crossing web page --- packages/core/package.json | 2 +- packages/core/src/mods/flowChart/createFlowChart.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/core/package.json b/packages/core/package.json index c21b21f..40d56a3 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -37,7 +37,7 @@ }, "dependencies": { "@ant-design/icons": "^4.0.6", - "@antv/x6": "^0.10.66", + "@antv/x6": "^0.12.0", "ace-builds": "^1.4.12", "antd": "^4.5.3", "react-ace": "^9.1.3", diff --git a/packages/core/src/mods/flowChart/createFlowChart.ts b/packages/core/src/mods/flowChart/createFlowChart.ts index 70ada5b..3fad23a 100644 --- a/packages/core/src/mods/flowChart/createFlowChart.ts +++ b/packages/core/src/mods/flowChart/createFlowChart.ts @@ -64,7 +64,11 @@ const createFlowChart = (container: HTMLDivElement, miniMapContainer: HTMLDivEle container, rotating: false, resizing: true, - clipboard: true, + // https://x6.antv.vision/zh/docs/tutorial/basic/clipboard + clipboard: { + enabled: true, + useLocalStorage: true + }, // https://x6.antv.vision/zh/docs/tutorial/intermediate/connector connecting: { snap: true,