From d85210372d3db8e5fd8bf8308237097a29f2a229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A1=97=E8=A7=92=E5=B0=8F=E6=9E=97?= <1013335014@qq.com> Date: Wed, 25 Dec 2024 09:17:15 +0800 Subject: [PATCH] =?UTF-8?q?Demo=EF=BC=9A=E5=8E=BB=E9=99=A4=E4=B8=8D?= =?UTF-8?q?=E5=BF=85=E8=A6=81=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/api/index.js | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/web/src/api/index.js b/web/src/api/index.js index 0a4f86f1..f783553b 100644 --- a/web/src/api/index.js +++ b/web/src/api/index.js @@ -9,24 +9,6 @@ const SIMPLE_MIND_MAP_LOCAL_CONFIG = 'SIMPLE_MIND_MAP_LOCAL_CONFIG' let mindMapData = null -/** - * @Author: 王林 - * @Date: 2021-08-02 22:36:48 - * @Desc: 克隆思维导图数据,去除激活状态 - */ -const copyMindMapTreeData = (tree, root) => { - if (!root) return null - tree.data = simpleDeepClone(root.data) - // tree.data.isActive = false - tree.children = [] - if (root.children && root.children.length > 0) { - root.children.forEach((item, index) => { - tree.children[index] = copyMindMapTreeData({}, item) - }) - } - return tree -} - /** * @Author: 王林 * @Date: 2021-08-01 10:10:49 @@ -65,7 +47,7 @@ export const storeData = data => { } else { originData = getData() } - originData.root = copyMindMapTreeData({}, data) + originData.root = data if (window.takeOverApp) { mindMapData = originData window.takeOverAppMethods.saveMindMapData(originData)