mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-21 10:27:44 +08:00
Fix:修复富文本插件转换节点数据时没有处理节点概要的问题
This commit is contained in:
parent
7f0202e16e
commit
e2403ae433
@ -327,8 +327,8 @@ class RichText {
|
||||
list.forEach(node => {
|
||||
this.mindMap.execCommand('SET_NODE_TEXT', node, html, true)
|
||||
// if (node.isGeneralization) {
|
||||
// 概要节点
|
||||
// node.generalizationBelongNode.updateGeneralization()
|
||||
// 概要节点
|
||||
// node.generalizationBelongNode.updateGeneralization()
|
||||
// }
|
||||
this.mindMap.render()
|
||||
})
|
||||
@ -649,7 +649,18 @@ class RichText {
|
||||
if (node.data.richText) {
|
||||
node.data.richText = false
|
||||
node.data.text = getTextFromHtml(node.data.text)
|
||||
// delete node.data.uid
|
||||
}
|
||||
// 概要
|
||||
let generalization =
|
||||
node.data && node.data.generalization ? node.data.generalization : []
|
||||
generalization = Array.isArray(generalization)
|
||||
? generalization
|
||||
: [generalization]
|
||||
if (generalization.length > 0) {
|
||||
generalization.forEach(item => {
|
||||
item.richText = false
|
||||
item.text = getTextFromHtml(item.text)
|
||||
})
|
||||
}
|
||||
},
|
||||
null,
|
||||
@ -670,6 +681,18 @@ class RichText {
|
||||
root.data.richText = true
|
||||
root.data.resetRichText = true
|
||||
}
|
||||
// 概要
|
||||
let generalization =
|
||||
root.data && root.data.generalization ? root.data.generalization : []
|
||||
generalization = Array.isArray(generalization)
|
||||
? generalization
|
||||
: [generalization]
|
||||
if (generalization.length > 0) {
|
||||
generalization.forEach(item => {
|
||||
item.richText = true
|
||||
item.resetRichText = true
|
||||
})
|
||||
}
|
||||
if (root.children && root.children.length > 0) {
|
||||
Array.from(root.children).forEach(item => {
|
||||
walk(item)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user