diff --git a/index.html b/index.html index 75fab367..993aff82 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -一个简单的web思维导图实现
\ No newline at end of file +一个简单的web思维导图实现
\ No newline at end of file diff --git a/simple-mind-map/package.json b/simple-mind-map/package.json index 7be104b9..950399a2 100644 --- a/simple-mind-map/package.json +++ b/simple-mind-map/package.json @@ -1,6 +1,6 @@ { "name": "simple-mind-map", - "version": "0.5.3-fix.1", + "version": "0.5.3-fix.2", "description": "一个简单的web在线思维导图", "authors": [ { diff --git a/simple-mind-map/src/Export.js b/simple-mind-map/src/Export.js index 0f890fbd..27fd84b7 100644 --- a/simple-mind-map/src/Export.js +++ b/simple-mind-map/src/Export.js @@ -37,6 +37,9 @@ class Export { item.attr('href', imgData) }) await Promise.all(task) + if (imageList.length > 0) { + svgHTML = svg.svg() + } // 如果开启了富文本编辑,需要把svg中的dom元素转换成图片 let nodeWithDomToImg = null if (domToImage && this.mindMap.richText) { diff --git a/web/src/pages/Doc/catalogList.js b/web/src/pages/Doc/catalogList.js index 6df78bde..fd699a46 100644 --- a/web/src/pages/Doc/catalogList.js +++ b/web/src/pages/Doc/catalogList.js @@ -11,7 +11,7 @@ let langList = [ } ] let StartList = ['introduction', 'start', 'translate', 'changelog'] -let CourseList = new Array(2).fill(0).map((_, index) => { +let CourseList = new Array(3).fill(0).map((_, index) => { return 'course' + (index + 1) }) let APIList = [ diff --git a/web/src/pages/Doc/en/changelog/index.md b/web/src/pages/Doc/en/changelog/index.md index b6447756..5127e6e3 100644 --- a/web/src/pages/Doc/en/changelog/index.md +++ b/web/src/pages/Doc/en/changelog/index.md @@ -10,6 +10,10 @@ New: 1.Support setting the position of the initial central node. Fix: 1.Fix the issue where setting the position of the initial central node does not take effect. +### 0.5.3-fix.2 + +Fix: 1.Fix the issue of not displaying images in nodes when exporting as images. + ## 0.5.2 Fix: 1.Remove `uid` from exported `JSON` data; 2.Clear the node cache pool when re rendering. diff --git a/web/src/pages/Doc/en/changelog/index.vue b/web/src/pages/Doc/en/changelog/index.vue index 83f89526..5e597103 100644 --- a/web/src/pages/Doc/en/changelog/index.vue +++ b/web/src/pages/Doc/en/changelog/index.vue @@ -4,6 +4,10 @@

0.5.3

Fix: 1.Fixed the issue of setting the text style when multiple nodes were selected in rich text mode, which would change the text of all selected nodes to the text of the last selected node.

New: 1.Support setting the position of the initial central node.

+

0.5.3-fix.1

+

Fix: 1.Fix the issue where setting the position of the initial central node does not take effect.

+

0.5.3-fix.2

+

Fix: 1.Fix the issue of not displaying images in nodes when exporting as images.

0.5.2

Fix: 1.Remove uid from exported JSON data; 2.Clear the node cache pool when re rendering.

0.5.1

diff --git a/web/src/pages/Doc/routerList.js b/web/src/pages/Doc/routerList.js index 16946338..bd5b465f 100644 --- a/web/src/pages/Doc/routerList.js +++ b/web/src/pages/Doc/routerList.js @@ -1,3 +1,3 @@ - export default [{"lang":"zh","children":[{"path":"associativeLine","title":"AssociativeLine 插件"},{"path":"batchExecution","title":"BatchExecution实例"},{"path":"changelog","title":"Changelog"},{"path":"command","title":"Command实例"},{"path":"constructor","title":"构造函数"},{"path":"course1","title":"基本使用"},{"path":"course2","title":"操作节点内容"},{"path":"doExport","title":"Export 插件"},{"path":"drag","title":"Drag插件"},{"path":"introduction","title":"简介"},{"path":"keyCommand","title":"KeyCommand实例"},{"path":"keyboardNavigation","title":"KeyboardNavigation插件"},{"path":"markdown","title":"Markdown解析"},{"path":"miniMap","title":"MiniMap插件"},{"path":"node","title":"Node实例"},{"path":"render","title":"Render实例"},{"path":"richText","title":"RichText插件"},{"path":"select","title":"Select 插件 "},{"path":"start","title":"开始"},{"path":"translate","title":"参与翻译"},{"path":"utils","title":"内置工具方法"},{"path":"view","title":"View实例"},{"path":"watermark","title":"Watermark插件"},{"path":"xmind","title":"XMind解析"}]},{"lang":"en","children":[{"path":"associativeLine","title":"AssociativeLine plugin"},{"path":"batchExecution","title":"batchExecution instance"},{"path":"changelog","title":"Changelog"},{"path":"command","title":"command instance"},{"path":"constructor","title":"Constructor"},{"path":"doExport","title":"Export plugin"},{"path":"drag","title":"Drag plugin"},{"path":"introduction","title":"Introduction"},{"path":"keyCommand","title":"KeyCommand instance"},{"path":"keyboardNavigation","title":"KeyboardNavigation plugin"},{"path":"markdown","title":"Markdown parse"},{"path":"miniMap","title":"MiniMap plugin"},{"path":"node","title":"Node instance"},{"path":"render","title":"Render instance"},{"path":"richText","title":"RichText plugin"},{"path":"select","title":"Select plugin"},{"path":"start","title":"Start"},{"path":"translate","title":"Participate in translation"},{"path":"utils","title":"Utility Methods"},{"path":"view","title":"View instance"},{"path":"watermark","title":"Watermark plugin"},{"path":"xmind","title":"XMind parse"}]}] + export default [{"lang":"zh","children":[{"path":"associativeLine","title":"AssociativeLine 插件"},{"path":"batchExecution","title":"BatchExecution实例"},{"path":"changelog","title":"Changelog"},{"path":"command","title":"Command实例"},{"path":"constructor","title":"构造函数"},{"path":"course1","title":"基本使用"},{"path":"course2","title":"操作节点内容"},{"path":"course3","title":"插入/删除节点、前进回退"},{"path":"doExport","title":"Export 插件"},{"path":"drag","title":"Drag插件"},{"path":"introduction","title":"简介"},{"path":"keyCommand","title":"KeyCommand实例"},{"path":"keyboardNavigation","title":"KeyboardNavigation插件"},{"path":"markdown","title":"Markdown解析"},{"path":"miniMap","title":"MiniMap插件"},{"path":"node","title":"Node实例"},{"path":"render","title":"Render实例"},{"path":"richText","title":"RichText插件"},{"path":"select","title":"Select 插件 "},{"path":"start","title":"开始"},{"path":"translate","title":"参与翻译"},{"path":"utils","title":"内置工具方法"},{"path":"view","title":"View实例"},{"path":"watermark","title":"Watermark插件"},{"path":"xmind","title":"XMind解析"}]},{"lang":"en","children":[{"path":"associativeLine","title":"AssociativeLine plugin"},{"path":"batchExecution","title":"batchExecution instance"},{"path":"changelog","title":"Changelog"},{"path":"command","title":"command instance"},{"path":"constructor","title":"Constructor"},{"path":"doExport","title":"Export plugin"},{"path":"drag","title":"Drag plugin"},{"path":"introduction","title":"Introduction"},{"path":"keyCommand","title":"KeyCommand instance"},{"path":"keyboardNavigation","title":"KeyboardNavigation plugin"},{"path":"markdown","title":"Markdown parse"},{"path":"miniMap","title":"MiniMap plugin"},{"path":"node","title":"Node instance"},{"path":"render","title":"Render instance"},{"path":"richText","title":"RichText plugin"},{"path":"select","title":"Select plugin"},{"path":"start","title":"Start"},{"path":"translate","title":"Participate in translation"},{"path":"utils","title":"Utility Methods"},{"path":"view","title":"View instance"},{"path":"watermark","title":"Watermark plugin"},{"path":"xmind","title":"XMind parse"}]}] \ No newline at end of file diff --git a/web/src/pages/Doc/zh/changelog/index.md b/web/src/pages/Doc/zh/changelog/index.md index 482f8167..b6ac2b92 100644 --- a/web/src/pages/Doc/zh/changelog/index.md +++ b/web/src/pages/Doc/zh/changelog/index.md @@ -10,6 +10,10 @@ 修复:1.修复设置初始中心节点的位置不生效的问题。 +### 0.5.3-fix.2 + +修复:1.修复导出为图片时,节点中的图片显示不出来的问题。 + ## 0.5.2 修复:1.导出的`json`数据中去除`uid`;2.重新渲染时清空节点缓存池。 diff --git a/web/src/pages/Doc/zh/changelog/index.vue b/web/src/pages/Doc/zh/changelog/index.vue index 10667b26..d410ad7f 100644 --- a/web/src/pages/Doc/zh/changelog/index.vue +++ b/web/src/pages/Doc/zh/changelog/index.vue @@ -4,6 +4,10 @@

0.5.3

修复:1.修复富文本模式下,如果选择了多个节点时设置文本样式,会将所有多选节点的文本改成最后一个多选节点的文本的问题。

新增:1.支持设置初始中心节点的位置。

+

0.5.3-fix.1

+

修复:1.修复设置初始中心节点的位置不生效的问题。

+

0.5.3-fix.2

+

修复:1.修复导出为图片时,节点中的图片显示不出来的问题。

0.5.2

修复:1.导出的json数据中去除uid;2.重新渲染时清空节点缓存池。

0.5.1

diff --git a/web/src/pages/Doc/zh/course1/index.md b/web/src/pages/Doc/zh/course1/index.md index 71806718..1a9123a0 100644 --- a/web/src/pages/Doc/zh/course1/index.md +++ b/web/src/pages/Doc/zh/course1/index.md @@ -1,6 +1,10 @@ # 基本使用 -> 重要说明:本教程中的在线编辑器中使用的是完整版的simple-mind-map,即包含所有插件,如果你是通过`npm`方式使用的话,需要自己手动注册相关插件。 +> 重要说明: +> +> 1.本教程中的在线编辑器中使用的是完整版的simple-mind-map,即包含所有插件,如果你是通过`npm`方式使用的话,需要自己手动注册相关插件。 +> +> 2.本教程的代码示例基于Vue3.x,但是您不必担心,因为simple-mind-map本身是框架无关的,所以即使某些Vue3的语法您看不懂也不会影响对于逻辑的理解。 `simple-mind-map`的使用非常简单,提供一个宽高不为0的元素,然后创建一个实例即可: diff --git a/web/src/pages/Doc/zh/course1/index.vue b/web/src/pages/Doc/zh/course1/index.vue index 6e3d3eff..20acb226 100644 --- a/web/src/pages/Doc/zh/course1/index.vue +++ b/web/src/pages/Doc/zh/course1/index.vue @@ -2,7 +2,9 @@

基本使用

-

重要说明:本教程中的在线编辑器中使用的是完整版的simple-mind-map,即包含所有插件,如果你是通过npm方式使用的话,需要自己手动注册相关插件。

+

重要说明:

+

1.本教程中的在线编辑器中使用的是完整版的simple-mind-map,即包含所有插件,如果你是通过npm方式使用的话,需要自己手动注册相关插件。

+

2.本教程的代码示例基于Vue3.x,但是您不必担心,因为simple-mind-map本身是框架无关的,所以即使某些Vue3的语法您看不懂也不会影响对于逻辑的理解。

simple-mind-map的使用非常简单,提供一个宽高不为0的元素,然后创建一个实例即可: