Demo:优化代码
This commit is contained in:
parent
89fd59adec
commit
8241bcbbb4
@ -570,15 +570,23 @@ export default {
|
|||||||
|
|
||||||
// 加载手绘风格插件
|
// 加载手绘风格插件
|
||||||
addHandDrawnLikeStylePlugin() {
|
addHandDrawnLikeStylePlugin() {
|
||||||
if (!this.mindMap) return
|
try {
|
||||||
this.mindMap.addPlugin(HandDrawnLikeStyle)
|
if (!this.mindMap) return
|
||||||
this.mindMap.reRender()
|
this.mindMap.addPlugin(HandDrawnLikeStyle)
|
||||||
|
this.mindMap.reRender()
|
||||||
|
} catch (error) {
|
||||||
|
console.log('手绘风格插件不存在')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 移除手绘风格插件
|
// 移除手绘风格插件
|
||||||
removeHandDrawnLikeStylePlugin() {
|
removeHandDrawnLikeStylePlugin() {
|
||||||
this.mindMap.removePlugin(HandDrawnLikeStyle)
|
try {
|
||||||
this.mindMap.reRender()
|
this.mindMap.removePlugin(HandDrawnLikeStyle)
|
||||||
|
this.mindMap.reRender()
|
||||||
|
} catch (error) {
|
||||||
|
console.log('手绘风格插件不存在')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 测试动态插入节点
|
// 测试动态插入节点
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user