Doc: update

This commit is contained in:
街角小林
2024-05-13 10:44:21 +08:00
parent 5cfc313f8e
commit 6f3a02d39e
13 changed files with 224 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "simple-mind-map",
"version": "0.9.11",
"version": "0.9.12",
"description": "一个简单的web在线思维导图",
"authors": [
{

View File

@@ -1,5 +1,45 @@
# Changelog
## 0.9.12
Fix:
> Fix the issue of bold title text being parsed as undefined when importing MD files;
>
> Select all, delete nodes, activate adjacent nodes, select multiple nodes, and other operations to increase the distribution of beforeynode-active events;
>
> Change the selection of multiple nodes to real-time distribution of node activation events;
>
> Fix the issue where the distance between icons and text gradually widens when both icons and line breaks are present in non rich text mode and are folded and unfolded;
>
> Fix xss vulnerability when displaying rich text content on nodes;
New:
> Support parsing of HTML formatted title text in MD files;
>
> Prohibit all contents of the canvas (except for hyperlinks and note icons of nodes) from responding to mouse events in demonstration mode;
>
> The demonstration mode supports fill in the blank mode, which means that underlined text is not displayed by default and will only be displayed sequentially by pressing the enter key;
>
> Demonstration mode supports summary content;
>
> The expandToNodeUid method of the render class supports summary nodes;
>
> The findNodeByUid (find the specified node instance on the canvas based on the uid) method of the render class supports summary nodes;
>
> Add instantiation options for adding pre - and post content to nodes, allowing custom content to be added before or after node text;
>
> Click event for adding distribution node labels;
>
> When using the moveNodeToCenter method of the render class to move a specified node to the center of the canvas, scaling is not restored by default;
Demo:
> Fix the issue of node note floating layer not being displayed in full screen view mode;
>
> Fix the issue where the note floating layer does not disappear after clicking the collapse button to collapse the node when displaying the note floating layer;
## 0.9.11
Fix

View File

@@ -1,6 +1,32 @@
<template>
<div>
<h1>Changelog</h1>
<h2>0.9.12</h2>
<p>Fix:</p>
<blockquote>
<p>Fix the issue of bold title text being parsed as undefined when importing MD files;</p>
<p>Select all, delete nodes, activate adjacent nodes, select multiple nodes, and other operations to increase the distribution of beforeynode-active events;</p>
<p>Change the selection of multiple nodes to real-time distribution of node activation events;</p>
<p>Fix the issue where the distance between icons and text gradually widens when both icons and line breaks are present in non rich text mode and are folded and unfolded;</p>
<p>Fix xss vulnerability when displaying rich text content on nodes;</p>
</blockquote>
<p>New:</p>
<blockquote>
<p>Support parsing of HTML formatted title text in MD files;</p>
<p>Prohibit all contents of the canvas (except for hyperlinks and note icons of nodes) from responding to mouse events in demonstration mode;</p>
<p>The demonstration mode supports fill in the blank mode, which means that underlined text is not displayed by default and will only be displayed sequentially by pressing the enter key;</p>
<p>Demonstration mode supports summary content;</p>
<p>The expandToNodeUid method of the render class supports summary nodes;</p>
<p>The findNodeByUid (find the specified node instance on the canvas based on the uid) method of the render class supports summary nodes;</p>
<p>Add instantiation options for adding pre - and post content to nodes, allowing custom content to be added before or after node text;</p>
<p>Click event for adding distribution node labels;</p>
<p>When using the moveNodeToCenter method of the render class to move a specified node to the center of the canvas, scaling is not restored by default;</p>
</blockquote>
<p>Demo:</p>
<blockquote>
<p>Fix the issue of node note floating layer not being displayed in full screen view mode;</p>
<p>Fix the issue where the note floating layer does not disappear after clicking the collapse button to collapse the node when displaying the note floating layer;</p>
</blockquote>
<h2>0.9.11</h2>
<p>Fix</p>
<blockquote>

View File

@@ -119,6 +119,9 @@ const mindMap = new MindMap({
| addContentToHeaderv0.9.9+ | Function、null | null | Add custom content to the header when exporting PNG, SVG, and PDF. Can pass a function that can return null to indicate no content is added, or it can return an object, For a detailed introduction, please refer to section 【How to add custom content when exporting】 below | |
| addContentToFooterv0.9.9+ | Function、null | null | The basic definition is the same as addContentToHeader, adding custom content at the end | |
| demonstrateConfigv0.9.11+ | Object、null | null | Demonstration plugin configuration. If not transmitted, the default configuration will be used. An object can be transmitted. If only a certain property is configured, only that property can be set. Other properties that have not been set will also use the default configuration. For complete configuration, please refer to the 【Demonstration Plugin Configuration】 section below | |
| resetScaleOnMoveNodeToCenterv0.9.12+ | Boolean | false | Whether to reset the scaling level to 100% when moving nodes to the canvas center, returning to the root node, and other operationsThe underlying impact is on the moveNodeToCenter method of the render class | |
| createNodePrefixContentv0.9.12+ | Function、null | null | Add additional node pre content.Pre content refers to the pre content in the area of the same line as the text, excluding the node image section.You can pass a function that takes the parameters of a node instance, returns a DOM node, or returns null | |
| createNodePostfixContentv0.9.12+ | Function、null | null | Add additional node post content.Post content refers to the post content in the area of the same line as the text, excluding the node image section.You can pass a function that takes the parameters of a node instance, returns a DOM node, or returns null | |
### Data structure
@@ -227,6 +230,7 @@ new MindMap({
| zIndex | Number | 9999 | The hierarchy of highlighted box elements |
| padding | Number | 20 | The inner margin of the highlighted box |
| margin | Number | 50 | The outer margin of the highlighted box |
| openBlankModev0.9.12+ | Boolean | true | Is enable fill in the blank mode, where underlined text is not displayed by default and only displayed sequentially by pressing the enter key |
## Static methods
@@ -506,6 +510,7 @@ Listen to an event. Event list:
| node_cooperate_avatar_mouseleavev0.9.9+ | Triggered when removing personnel avatars with the mouse during collaborative editing | userInfo(User info)、 this(Current node instance)、 node(Avatar node)、 e(Event Object) |
| exit_demonstratev0.9.11+ | Triggered when exiting demonstration mode | |
| demonstrate_jumpv0.9.11+ | Trigger when switching steps in demonstration mode | currentStepIndexThe index of the steps currently played, counting from 0、stepLengthTotal number of playback steps |
| node_tag_clickv0.9.12+ | Click events on node labels | this(Current node instance)、itemContent of clicked tags |
### emit(event, ...args)

View File

@@ -693,6 +693,27 @@
<td>Demonstration plugin configuration. If not transmitted, the default configuration will be used. An object can be transmitted. If only a certain property is configured, only that property can be set. Other properties that have not been set will also use the default configuration. For complete configuration, please refer to the 【Demonstration Plugin Configuration】 section below</td>
<td></td>
</tr>
<tr>
<td>resetScaleOnMoveNodeToCenterv0.9.12+</td>
<td>Boolean</td>
<td>false</td>
<td>Whether to reset the scaling level to 100% when moving nodes to the canvas center, returning to the root node, and other operationsThe underlying impact is on the moveNodeToCenter method of the render class</td>
<td></td>
</tr>
<tr>
<td>createNodePrefixContentv0.9.12+</td>
<td>Function、null</td>
<td>null</td>
<td>Add additional node pre content.Pre content refers to the pre content in the area of the same line as the text, excluding the node image section.You can pass a function that takes the parameters of a node instance, returns a DOM node, or returns null</td>
<td></td>
</tr>
<tr>
<td>createNodePostfixContentv0.9.12+</td>
<td>Function、null</td>
<td>null</td>
<td>Add additional node post content.Post content refers to the post content in the area of the same line as the text, excluding the node image section.You can pass a function that takes the parameters of a node instance, returns a DOM node, or returns null</td>
<td></td>
</tr>
</tbody>
</table>
<h3>Data structure</h3>
@@ -888,6 +909,12 @@
<td>50</td>
<td>The outer margin of the highlighted box</td>
</tr>
<tr>
<td>openBlankModev0.9.12+</td>
<td>Boolean</td>
<td>true</td>
<td>Is enable fill in the blank mode, where underlined text is not displayed by default and only displayed sequentially by pressing the enter key</td>
</tr>
</tbody>
</table>
<h2>Static methods</h2>
@@ -1326,6 +1353,11 @@ poor performance and should be used sparingly.</p>
<td>Trigger when switching steps in demonstration mode</td>
<td>currentStepIndexThe index of the steps currently played, counting from 0、stepLengthTotal number of playback steps</td>
</tr>
<tr>
<td>node_tag_clickv0.9.12+</td>
<td>Click events on node labels</td>
<td>this(Current node instance)、itemContent of clicked tags</td>
</tr>
</tbody>
</table>
<h3>emit(event, ...args)</h3>

View File

@@ -94,10 +94,12 @@ End text editing, restore enter key and delete key related shortcuts.
Add a node to the active list.
### addNodeToActiveList(node)
### addNodeToActiveList(node, notEmitBeforeNodeActiveEvent = false)
> v0.8.0+
- `notEmitBeforeNodeActiveEvent`v0.9.12+is not distribute the 'before_node_active' event, which defaults to 'false' and will be distributed;
Add a node to the active list.
### removeActiveNode(node)

View File

@@ -77,10 +77,13 @@ disable the enter key and delete key related shortcuts to prevent conflicts.</p>
<p>v0.8.0+ abandoned</p>
</blockquote>
<p>Add a node to the active list.</p>
<h3>addNodeToActiveList(node)</h3>
<h3>addNodeToActiveList(node, notEmitBeforeNodeActiveEvent = false)</h3>
<blockquote>
<p>v0.8.0+</p>
</blockquote>
<ul>
<li><code>notEmitBeforeNodeActiveEvent</code>v0.9.12+is not distribute the 'before_node_active' event, which defaults to 'false' and will be distributed;</li>
</ul>
<p>Add a node to the active list.</p>
<h3>removeActiveNode(node)</h3>
<blockquote>

View File

@@ -1,5 +1,45 @@
# Changelog
## 0.9.12
修复:
> 修复导入md文件时存在加粗的标题文本会解析为undefined的问题
>
> 全选、删除节点激活相邻节点、多选节点等操作增加派发before_node_active事件
>
> 多选节点改为实时派发节点激活事件;
>
> 修复非富文本模式下同时存在图标和换行的文本时,被收起和展开时图标与文字距离会逐渐拉大的问题;
>
> 修复节点富文本内容显示时的xss漏洞
新增:
> 支持解析md文件中带html格式的标题文本
>
> 演示模式中禁止画布的所有内容(除了节点的超链接和备注图标)响应鼠标事件;
>
> 演示模式支持填空模式,即带下划线的文本默认不显示,按回车键才会依次显示;
>
> 演示模式支持概要内容;
>
> render类的expandToNodeUid展开到指定节点方法支持概要节点
>
> render类的findNodeByUid根据uid找到画布指定节点实例方法支持概要节点
>
> 新增添加节点附加的前置和后置内容的实例化选项,即允许在节点文本前面或后面添加自定义的内容;
>
> 新增派发节点标签的点击事件;
>
> 通过render类的moveNodeToCenter方法移动指定节点到画布中心时默认不恢复缩放
Demo
> 修复全屏查看模式下节点备注浮层无法显示的问题;
>
> 修复备注浮层显示时点击收起按钮收起节点后,备注浮层未消失的问题;
## 0.9.11
修复:

View File

@@ -1,6 +1,32 @@
<template>
<div>
<h1>Changelog</h1>
<h2>0.9.12</h2>
<p>修复</p>
<blockquote>
<p>修复导入md文件时存在加粗的标题文本会解析为undefined的问题</p>
<p>全选删除节点激活相邻节点多选节点等操作增加派发before_node_active事件</p>
<p>多选节点改为实时派发节点激活事件</p>
<p>修复非富文本模式下同时存在图标和换行的文本时被收起和展开时图标与文字距离会逐渐拉大的问题</p>
<p>修复节点富文本内容显示时的xss漏洞</p>
</blockquote>
<p>新增</p>
<blockquote>
<p>支持解析md文件中带html格式的标题文本</p>
<p>演示模式中禁止画布的所有内容除了节点的超链接和备注图标响应鼠标事件</p>
<p>演示模式支持填空模式即带下划线的文本默认不显示按回车键才会依次显示</p>
<p>演示模式支持概要内容</p>
<p>render类的expandToNodeUid展开到指定节点方法支持概要节点</p>
<p>render类的findNodeByUid根据uid找到画布指定节点实例方法支持概要节点</p>
<p>新增添加节点附加的前置和后置内容的实例化选项即允许在节点文本前面或后面添加自定义的内容</p>
<p>新增派发节点标签的点击事件</p>
<p>通过render类的moveNodeToCenter方法移动指定节点到画布中心时默认不恢复缩放</p>
</blockquote>
<p>Demo</p>
<blockquote>
<p>修复全屏查看模式下节点备注浮层无法显示的问题</p>
<p>修复备注浮层显示时点击收起按钮收起节点后备注浮层未消失的问题</p>
</blockquote>
<h2>0.9.11</h2>
<p>修复</p>
<blockquote>

View File

@@ -118,6 +118,9 @@ const mindMap = new MindMap({
| addContentToHeaderv0.9.9+ | Function、null | null | 导出png、svg、pdf时在头部添加自定义内容。可传递一个函数这个函数可以返回null代表不添加内容也可以返回一个对象详细介绍请参考下方【导出时如何添加自定义内容】 |
| addContentToFooterv0.9.9+ | Function、null | null | 基本释义同addContentToHeader在尾部添加自定义内容 |
| demonstrateConfigv0.9.11+ | Object、null | null | 演示插件Demonstrate的配置。不传则使用默认配置可传递一个对象如果只配置某个属性可以只设置该属性其他没有设置的同样会使用默认配置完整配置请参考下方【演示插件配置】小节 |
| resetScaleOnMoveNodeToCenterv0.9.12+ | Boolean | false | 移动节点到画布中心、回到根节点等操作时是否将缩放层级复位为100%底层影响的是render类的moveNodeToCenter方法 |
| createNodePrefixContentv0.9.12+ | Function、null | null | 添加附加的节点前置内容。前置内容指和文本同一行的区域中的前置内容不包括节点图片部分。可以传递一个函数这个函数接收一个节点实例的参数可以返回一个DOM节点也可以返回null |
| createNodePostfixContentv0.9.12+ | Function、null | null | 添加附加的节点后置内容。后置内容指和文本同一行的区域中的后置内容不包括节点图片部分。可以传递一个函数这个函数接收一个节点实例的参数可以返回一个DOM节点也可以返回null |
### 数据结构
@@ -222,12 +225,13 @@ new MindMap({
| 字段名称 | 类型 | 默认值 | 描述 |
| ----------- | ------ | ------------------------------------------- | ------------------------------------ |
| boxShadowColor | String | rgba(0, 0, 0, 0.8) | 高亮框四周区域的颜色 |
| borderRadius | String | 5px | 高亮框的圆角大小 |
| transition | String | all 0.3s ease-out | 高亮框动画的过渡属性CSS的transition属性 |
| zIndex | Number | 9999 | 高亮框元素的层级 |
| padding | Number | 20 | 高亮框的内边距 |
| margin | Number | 50 | 高亮框的外边距 |
| boxShadowColor | String | rgba(0, 0, 0, 0.8) | 高亮框四周区域的颜色 |
| borderRadius | String | 5px | 高亮框的圆角大小 |
| transition | String | all 0.3s ease-out | 高亮框动画的过渡属性CSS的transition属性 |
| zIndex | Number | 9999 | 高亮框元素的层级 |
| padding | Number | 20 | 高亮框的内边距 |
| margin | Number | 50 | 高亮框的外边距 |
| openBlankModev0.9.12+ | Boolean | true | 是否开启填空模式,即带下划线的文本默认不显示,按回车键才依次显示 |
## 静态方法
@@ -504,6 +508,7 @@ mindMap.setTheme('主题名称')
| node_cooperate_avatar_mouseleavev0.9.9+ | 协同编辑时,鼠标移除人员头像时触发 | userInfo(人员信息)、 this(当前节点实例)、 node(头像节点)、 e(事件对象) |
| exit_demonstratev0.9.11+ | 退出演示模式时触发 | |
| demonstrate_jumpv0.9.11+ | 演示模式中,切换步骤时触发 | currentStepIndex当前播放到的步骤索引从0开始计数、stepLength总的播放步骤数量 |
| node_tag_clickv0.9.12+ | 节点标签的点击事件 | this(当前节点实例)、item点击的标签内容 |
### emit(event, ...args)

View File

@@ -591,6 +591,24 @@
<td>null</td>
<td>演示插件Demonstrate的配置不传则使用默认配置可传递一个对象如果只配置某个属性可以只设置该属性其他没有设置的同样会使用默认配置完整配置请参考下方演示插件配置小节</td>
</tr>
<tr>
<td>resetScaleOnMoveNodeToCenterv0.9.12+</td>
<td>Boolean</td>
<td>false</td>
<td>移动节点到画布中心回到根节点等操作时是否将缩放层级复位为100%底层影响的是render类的moveNodeToCenter方法</td>
</tr>
<tr>
<td>createNodePrefixContentv0.9.12+</td>
<td>Functionnull</td>
<td>null</td>
<td>添加附加的节点前置内容前置内容指和文本同一行的区域中的前置内容不包括节点图片部分可以传递一个函数这个函数接收一个节点实例的参数可以返回一个DOM节点也可以返回null</td>
</tr>
<tr>
<td>createNodePostfixContentv0.9.12+</td>
<td>Functionnull</td>
<td>null</td>
<td>添加附加的节点后置内容后置内容指和文本同一行的区域中的后置内容不包括节点图片部分可以传递一个函数这个函数接收一个节点实例的参数可以返回一个DOM节点也可以返回null</td>
</tr>
</tbody>
</table>
<h3>数据结构</h3>
@@ -788,6 +806,12 @@
<td>50</td>
<td>高亮框的外边距</td>
</tr>
<tr>
<td>openBlankModev0.9.12+</td>
<td>Boolean</td>
<td>true</td>
<td>是否开启填空模式即带下划线的文本默认不显示按回车键才依次显示</td>
</tr>
</tbody>
</table>
<h2>静态方法</h2>
@@ -1219,6 +1243,11 @@ mindMap.setTheme(<span class="hljs-string">&#x27;主题名称&#x27;</span>)
<td>演示模式中切换步骤时触发</td>
<td>currentStepIndex当前播放到的步骤索引从0开始计数stepLength总的播放步骤数量</td>
</tr>
<tr>
<td>node_tag_clickv0.9.12+</td>
<td>节点标签的点击事件</td>
<td>this(当前节点实例)item点击的标签内容</td>
</tr>
</tbody>
</table>
<h3>emit(event, ...args)</h3>

View File

@@ -94,10 +94,12 @@
添加节点到激活列表里。
### addNodeToActiveList(node)
### addNodeToActiveList(node, notEmitBeforeNodeActiveEvent = false)
> v0.8.0+
- `notEmitBeforeNodeActiveEvent`v0.9.12+,是否不要派发`before_node_active`事件,默认为`false`,即会派发;
添加节点到激活列表里。
### removeActiveNode(node)

View File

@@ -76,10 +76,13 @@
<p>v0.8.0+已废弃</p>
</blockquote>
<p>添加节点到激活列表里</p>
<h3>addNodeToActiveList(node)</h3>
<h3>addNodeToActiveList(node, notEmitBeforeNodeActiveEvent = false)</h3>
<blockquote>
<p>v0.8.0+</p>
</blockquote>
<ul>
<li><code>notEmitBeforeNodeActiveEvent</code>v0.9.12+是否不要派发<code>before_node_active</code>事件默认为<code>false</code>即会派发</li>
</ul>
<p>添加节点到激活列表里</p>
<h3>removeActiveNode(node)</h3>
<blockquote>