From 3642763301162c61ee11d2cad141b0d3fbe66f42 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:57:50 +0800 Subject: [PATCH] =?UTF-8?q?Feat=EF=BC=9A=E8=8A=82=E7=82=B9=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=A2=9E=E5=8A=A0=E5=AD=97=E6=AE=B5=EF=BC=8C=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E5=BD=93=E5=89=8D=E5=BA=93=E7=9A=84=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simple-mind-map/src/core/command/Command.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/simple-mind-map/src/core/command/Command.js b/simple-mind-map/src/core/command/Command.js index fc25ec47..0aab42d5 100644 --- a/simple-mind-map/src/core/command/Command.js +++ b/simple-mind-map/src/core/command/Command.js @@ -6,6 +6,7 @@ import { transformTreeDataToObject } from '../../utils' import { ERROR_TYPES } from '../../constants/constant' +import pkg from '../../../package.json' // 命令类 class Command { @@ -172,7 +173,9 @@ class Command { // 获取渲染树数据副本 getCopyData() { if (!this.mindMap.renderer.renderTree) return null - return copyRenderTree({}, this.mindMap.renderer.renderTree, true) + const res = copyRenderTree({}, this.mindMap.renderer.renderTree, true) + res.smmVersion = pkg.version + return res } // 移除节点数据中的uid