Feat:节点数据增加字段,保存当前库的版本号
This commit is contained in:
parent
11c6fa3e45
commit
3642763301
@ -6,6 +6,7 @@ import {
|
|||||||
transformTreeDataToObject
|
transformTreeDataToObject
|
||||||
} from '../../utils'
|
} from '../../utils'
|
||||||
import { ERROR_TYPES } from '../../constants/constant'
|
import { ERROR_TYPES } from '../../constants/constant'
|
||||||
|
import pkg from '../../../package.json'
|
||||||
|
|
||||||
// 命令类
|
// 命令类
|
||||||
class Command {
|
class Command {
|
||||||
@ -172,7 +173,9 @@ class Command {
|
|||||||
// 获取渲染树数据副本
|
// 获取渲染树数据副本
|
||||||
getCopyData() {
|
getCopyData() {
|
||||||
if (!this.mindMap.renderer.renderTree) return null
|
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
|
// 移除节点数据中的uid
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user