diff --git a/simple-mind-map/src/constants/defaultOptions.js b/simple-mind-map/src/constants/defaultOptions.js index 44c5a919..078653cf 100644 --- a/simple-mind-map/src/constants/defaultOptions.js +++ b/simple-mind-map/src/constants/defaultOptions.js @@ -212,5 +212,7 @@ export const defaultOpt = { }, // 关联线是否始终显示在节点上层 // false:即创建关联线和激活关联线时处于最顶层,其他情况下处于节点下方 - associativeLineIsAlwaysAboveNode: true + associativeLineIsAlwaysAboveNode: true, + // 插入概要的默认文本 + defaultGeneralizationText: '概要' } diff --git a/simple-mind-map/src/core/render/Render.js b/simple-mind-map/src/core/render/Render.js index 8abd7439..163cac4a 100644 --- a/simple-mind-map/src/core/render/Render.js +++ b/simple-mind-map/src/core/render/Render.js @@ -1355,7 +1355,7 @@ class Render { } this.mindMap.execCommand('SET_NODE_DATA', node, { generalization: data || { - text: '概要' + text: this.mindMap.opt.defaultGeneralizationText } }) node.update()