mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-21 10:27:44 +08:00
Doc: update
This commit is contained in:
parent
2548ac4eb4
commit
7f199e6c2f
@ -153,4 +153,8 @@ const mindMap = new MindMap({
|
||||
<img src="./web/src/assets/avatar/才镇.jpg" style="width: 50px;height: 50px;" />
|
||||
<span>才镇</span>
|
||||
</span>
|
||||
<span>
|
||||
<img src="./web/src/assets/avatar/小米.jpg" style="width: 50px;height: 50px;" />
|
||||
<span>小米bbᯤ²ᴳ</span>
|
||||
</span>
|
||||
</p>
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "simple-mind-map",
|
||||
"version": "0.6.15-fix.2",
|
||||
"version": "0.6.16",
|
||||
"description": "一个简单的web在线思维导图",
|
||||
"authors": [
|
||||
{
|
||||
|
||||
BIN
web/src/assets/avatar/小米.jpg
Normal file
BIN
web/src/assets/avatar/小米.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
@ -1,5 +1,23 @@
|
||||
# Changelog
|
||||
|
||||
## 0.6.16
|
||||
|
||||
Fix:
|
||||
|
||||
> 1.Optimize the logic of rich text measurement elements, remove duplicate settings for styles, and add duplicate nodes
|
||||
>
|
||||
> 2.Optimize the export image logic, and when traversing the node to convert the URL of the image, if it is already in the form of data: URL, do not handle it repeatedly.
|
||||
|
||||
New:
|
||||
|
||||
> 1.Remove the second parameter of the exported SVG method and configure it through instantiation instead.
|
||||
>
|
||||
> 2.Export images without using external libraries.
|
||||
|
||||
Demo:
|
||||
|
||||
> 1.Fixed a bug where siblings can be added to the root node when editing the outline separately.
|
||||
|
||||
## 0.6.15-fix.2
|
||||
|
||||
Fix: Fixed an issue where rich text nodes cannot be displayed in Firefox browser.
|
||||
|
||||
@ -1,6 +1,21 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>Changelog</h1>
|
||||
<h2>0.6.16</h2>
|
||||
<p>Fix:</p>
|
||||
<blockquote>
|
||||
<p>1.Optimize the logic of rich text measurement elements, remove duplicate settings for styles, and add duplicate nodes</p>
|
||||
<p>2.Optimize the export image logic, and when traversing the node to convert the URL of the image, if it is already in the form of data: URL, do not handle it repeatedly.</p>
|
||||
</blockquote>
|
||||
<p>New:</p>
|
||||
<blockquote>
|
||||
<p>1.Remove the second parameter of the exported SVG method and configure it through instantiation instead.</p>
|
||||
<p>2.Export images without using external libraries.</p>
|
||||
</blockquote>
|
||||
<p>Demo:</p>
|
||||
<blockquote>
|
||||
<p>1.Fixed a bug where siblings can be added to the root node when editing the outline separately.</p>
|
||||
</blockquote>
|
||||
<h2>0.6.15-fix.2</h2>
|
||||
<p>Fix: Fixed an issue where rich text nodes cannot be displayed in Firefox browser.</p>
|
||||
<h2>0.6.15-fix.1</h2>
|
||||
|
||||
@ -79,6 +79,7 @@ const mindMap = new MindMap({
|
||||
| customHandleClipboardText(v0.6.14+) | Function | null | Customize the processing of clipboard text. When pressing ctrl+v to paste, it will read the text and images from the user's clipboard. By default, it will only determine whether the text is regular text and node data in simple mind map format. If you want to process data from other mind maps, such as process, zhixi, etc., you can pass a function that takes the text from the current clipboard as a parameter and returns the processed data, which can be of two types: 1.If a pure text is returned, a child node will be directly created with that text; 2.Returns a node object in the following format: { simpleMindMap: true, data: { data: { text: '' }, children: [] } }, The representative is data in simple bind map format, and the node data is in the same format as the simple bind map node data. If your processing logic has asynchronous logic, you can also return a promise | |
|
||||
| errorHandler(v0.6.15+) | Function | | Custom error handling functions currently only throw some asynchronous logic errors. Can pass a function that takes two parameters, the first being the wrong type and the second being the wrong object | |
|
||||
| disableMouseWheelZoom(v0.6.15+) | Boolean | false | Prohibit mouse wheel scaling, you can still use the API for scaling | |
|
||||
| resetCss(v0.6.16+) | String | * { margin: 0; padding: 0; box-sizing: border-box; } | When exporting images and SVGs, the default style overlay for rich text node content, which is embedded in HTML nodes in SVGs, will occur. If not overlaid, the node content will be offset | |
|
||||
|
||||
### Watermark config
|
||||
|
||||
|
||||
@ -413,6 +413,13 @@
|
||||
<td>Prohibit mouse wheel scaling, you can still use the API for scaling</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>resetCss(v0.6.16+)</td>
|
||||
<td>String</td>
|
||||
<td>* { margin: 0; padding: 0; box-sizing: border-box; }</td>
|
||||
<td>When exporting images and SVGs, the default style overlay for rich text node content, which is embedded in HTML nodes in SVGs, will occur. If not overlaid, the node content will be offset</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Watermark config</h3>
|
||||
|
||||
@ -52,7 +52,7 @@ Exports as `png`.
|
||||
|
||||
- `name`:`svg` title
|
||||
|
||||
- `plusCssText`:v0.4.0+, When node rich text editing is enabled and `domToImage` passes `false`, additional `css` styles can be added. If there is a `dom` node in `svg`, you can set some styles for the node through this parameter, such as:
|
||||
- `plusCssText`:v0.4.0+, (v0.6.16+This parameter has been removed and instead passed in through the `resetCss` configuration during instantiation), When node rich text editing is enabled and `domToImage` passes `false`, additional `css` styles can be added. If there is a `dom` node in `svg`, you can set some styles for the node through this parameter, such as:
|
||||
|
||||
```js
|
||||
svg(
|
||||
|
||||
@ -46,7 +46,7 @@ a.click()
|
||||
<p><code>name</code>:<code>svg</code> title</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>plusCssText</code>:v0.4.0+, When node rich text editing is enabled and <code>domToImage</code> passes <code>false</code>, additional <code>css</code> styles can be added. If there is a <code>dom</code> node in <code>svg</code>, you can set some styles for the node through this parameter, such as:</p>
|
||||
<p><code>plusCssText</code>:v0.4.0+, (v0.6.16+This parameter has been removed and instead passed in through the <code>resetCss</code> configuration during instantiation), When node rich text editing is enabled and <code>domToImage</code> passes <code>false</code>, additional <code>css</code> styles can be added. If there is a <code>dom</code> node in <code>svg</code>, you can set some styles for the node through this parameter, such as:</p>
|
||||
</li>
|
||||
</ul>
|
||||
<pre class="hljs"><code>svg(
|
||||
|
||||
@ -169,4 +169,8 @@ Open source is not easy. If this project is helpful to you, you can invite the a
|
||||
<img src="../../../../assets/avatar/才镇.jpg" style="width: 50px;height: 50px;object-fit: cover;border-radius: 50%;" />
|
||||
<p>才镇</p>
|
||||
</div>
|
||||
<div style="display: flex; flex-direction: column; align-items: center; width: fit-content; margin: 5px;">
|
||||
<img src="../../../../assets/avatar/小米.jpg" style="width: 50px;height: 50px;object-fit: cover;border-radius: 50%;" />
|
||||
<p>小米bbᯤ²ᴳ</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -129,6 +129,10 @@ full screen, support mini map</li>
|
||||
<img src="../../../../assets/avatar/才镇.jpg" style="width: 50px;height: 50px;object-fit: cover;border-radius: 50%;" />
|
||||
<p>才镇</p>
|
||||
</div>
|
||||
<div style="display: flex; flex-direction: column; align-items: center; width: fit-content; margin: 5px;">
|
||||
<img src="../../../../assets/avatar/小米.jpg" style="width: 50px;height: 50px;object-fit: cover;border-radius: 50%;" />
|
||||
<p>小米bbᯤ²ᴳ</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -1,5 +1,23 @@
|
||||
# Changelog
|
||||
|
||||
## 0.6.16
|
||||
|
||||
修复:
|
||||
|
||||
> 1.优化富文本测量元素的逻辑,删除样式的重复设置和节点的重复添加。
|
||||
>
|
||||
> 2.优化导出图片逻辑,遍历节点转换图片的url时,如果已经是data:URL形式不重复处理。
|
||||
|
||||
新增:
|
||||
|
||||
> 1.去除导出svg方法的第二个参数,改为通过实例化配置。
|
||||
>
|
||||
> 2.导出图片不再使用外部库。
|
||||
|
||||
Demo:
|
||||
|
||||
> 1.修复单独编辑大纲时能给根节点添加兄弟节点的bug。
|
||||
|
||||
## 0.6.15-fix.2
|
||||
|
||||
修复:修复在Firefox浏览器中富文本节点无法显示的问题。
|
||||
|
||||
@ -1,6 +1,21 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>Changelog</h1>
|
||||
<h2>0.6.16</h2>
|
||||
<p>修复:</p>
|
||||
<blockquote>
|
||||
<p>1.优化富文本测量元素的逻辑,删除样式的重复设置和节点的重复添加。</p>
|
||||
<p>2.优化导出图片逻辑,遍历节点转换图片的url时,如果已经是data:URL形式不重复处理。</p>
|
||||
</blockquote>
|
||||
<p>新增:</p>
|
||||
<blockquote>
|
||||
<p>1.去除导出svg方法的第二个参数,改为通过实例化配置。</p>
|
||||
<p>2.导出图片不再使用外部库。</p>
|
||||
</blockquote>
|
||||
<p>Demo:</p>
|
||||
<blockquote>
|
||||
<p>1.修复单独编辑大纲时能给根节点添加兄弟节点的bug。</p>
|
||||
</blockquote>
|
||||
<h2>0.6.15-fix.2</h2>
|
||||
<p>修复:修复在Firefox浏览器中富文本节点无法显示的问题。</p>
|
||||
<h2>0.6.15-fix.1</h2>
|
||||
|
||||
@ -79,6 +79,7 @@ const mindMap = new MindMap({
|
||||
| customHandleClipboardText(v0.6.14+) | Function | null | 自定义对剪贴板文本的处理。当按ctrl+v粘贴时会读取用户剪贴板中的文本和图片,默认只会判断文本是否是普通文本和simple-mind-map格式的节点数据,如果你想处理其他思维导图的数据,比如processon、zhixi等,那么可以传递一个函数,接受当前剪贴板中的文本为参数,返回处理后的数据,可以返回两种类型:1.返回一个纯文本,那么会直接以该文本创建一个子节点;2.返回一个节点对象,格式如下:{ simpleMindMap: true, data: { data: { text: '' }, children: [] } },代表是simple-mind-map格式的数据,节点数据同simple-mind-map节点数据格式,如果你的处理逻辑存在异步逻辑,也可以返回一个promise | |
|
||||
| errorHandler(v0.6.15+) | Function | | 自定义错误处理函数,目前只会抛出一些异步逻辑出错的情况。可以传递一个函数,会接收两个参数,第一个为错误的类型,第二个为错误对象 | |
|
||||
| disableMouseWheelZoom(v0.6.15+) | Boolean | false | 禁止鼠标滚轮缩放,你仍旧可以使用api进行缩放 | |
|
||||
| resetCss(v0.6.16+) | String | * { margin: 0; padding: 0; box-sizing: border-box; } | 设置导出图片和svg时,针对富文本节点内容,也就是嵌入到svg中的html节点的默认样式覆盖,如果不覆盖,节点内容会发生偏移 | |
|
||||
|
||||
### 水印配置
|
||||
|
||||
|
||||
@ -413,6 +413,13 @@
|
||||
<td>禁止鼠标滚轮缩放,你仍旧可以使用api进行缩放</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>resetCss(v0.6.16+)</td>
|
||||
<td>String</td>
|
||||
<td>* { margin: 0; padding: 0; box-sizing: border-box; }</td>
|
||||
<td>设置导出图片和svg时,针对富文本节点内容,也就是嵌入到svg中的html节点的默认样式覆盖,如果不覆盖,节点内容会发生偏移</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>水印配置</h3>
|
||||
|
||||
@ -72,6 +72,8 @@ mindMap.export(type, isDownload, fileName, plusCssText = '')
|
||||
|
||||
如果开启了节点富文本编辑,也就是`svg`中会存在节点的`html`结构,这就又存在一个问题,因为浏览器对每个元素默认会设置一些样式,影响最大的就是`margin`和`padding`,这就有可能会导致节点中的文字错位,所以可以通过`plusCssText`参数传入`css`样式:
|
||||
|
||||
> 在v0.6.16+版本后,plusCssText参数已被删除,改为在实例化时通过`resetCss`配置传入。
|
||||
|
||||
```js
|
||||
mindMap.export(
|
||||
'svg',
|
||||
|
||||
@ -46,6 +46,9 @@ mindMap.export(<span class="hljs-string">'pdf'</span>, <span class="hl
|
||||
<pre class="hljs"><code>mindMap.export(type, isDownload, fileName, plusCssText = <span class="hljs-string">''</span>)
|
||||
</code></pre>
|
||||
<p>如果开启了节点富文本编辑,也就是<code>svg</code>中会存在节点的<code>html</code>结构,这就又存在一个问题,因为浏览器对每个元素默认会设置一些样式,影响最大的就是<code>margin</code>和<code>padding</code>,这就有可能会导致节点中的文字错位,所以可以通过<code>plusCssText</code>参数传入<code>css</code>样式:</p>
|
||||
<blockquote>
|
||||
<p>在v0.6.16+版本后,plusCssText参数已被删除,改为在实例化时通过<code>resetCss</code>配置传入。</p>
|
||||
</blockquote>
|
||||
<pre class="hljs"><code>mindMap.export(
|
||||
<span class="hljs-string">'svg'</span>,
|
||||
<span class="hljs-literal">true</span>,
|
||||
|
||||
@ -52,7 +52,7 @@ a.click()
|
||||
|
||||
- `name`:`svg`标题
|
||||
|
||||
- `plusCssText`:v0.4.0+,当开启了节点富文本编辑,且`domToImage`传了`false`时,可以添加附加的`css`样式,如果`svg`中存在`dom`节点,想要设置一些针对节点的样式可以通过这个参数传入,比如:
|
||||
- `plusCssText`:v0.4.0+,(v0.6.16+已去除该参数,改为在实例化时通过`resetCss`配置传入),当开启了节点富文本编辑,且`domToImage`传了`false`时,可以添加附加的`css`样式,如果`svg`中存在`dom`节点,想要设置一些针对节点的样式可以通过这个参数传入,比如:
|
||||
|
||||
```js
|
||||
svg(
|
||||
|
||||
@ -46,7 +46,7 @@ a.click()
|
||||
<p><code>name</code>:<code>svg</code>标题</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>plusCssText</code>:v0.4.0+,当开启了节点富文本编辑,且<code>domToImage</code>传了<code>false</code>时,可以添加附加的<code>css</code>样式,如果<code>svg</code>中存在<code>dom</code>节点,想要设置一些针对节点的样式可以通过这个参数传入,比如:</p>
|
||||
<p><code>plusCssText</code>:v0.4.0+,(v0.6.16+已去除该参数,改为在实例化时通过<code>resetCss</code>配置传入),当开启了节点富文本编辑,且<code>domToImage</code>传了<code>false</code>时,可以添加附加的<code>css</code>样式,如果<code>svg</code>中存在<code>dom</code>节点,想要设置一些针对节点的样式可以通过这个参数传入,比如:</p>
|
||||
</li>
|
||||
</ul>
|
||||
<pre class="hljs"><code>svg(
|
||||
|
||||
@ -162,4 +162,8 @@
|
||||
<img src="../../../../assets/avatar/才镇.jpg" style="width: 50px;height: 50px;object-fit: cover;border-radius: 50%;" />
|
||||
<p>才镇</p>
|
||||
</div>
|
||||
<div style="display: flex; flex-direction: column; align-items: center; width: fit-content; margin: 5px;">
|
||||
<img src="../../../../assets/avatar/小米.jpg" style="width: 50px;height: 50px;object-fit: cover;border-radius: 50%;" />
|
||||
<p>小米bbᯤ²ᴳ</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -123,6 +123,10 @@
|
||||
<img src="../../../../assets/avatar/才镇.jpg" style="width: 50px;height: 50px;object-fit: cover;border-radius: 50%;" />
|
||||
<p>才镇</p>
|
||||
</div>
|
||||
<div style="display: flex; flex-direction: column; align-items: center; width: fit-content; margin: 5px;">
|
||||
<img src="../../../../assets/avatar/小米.jpg" style="width: 50px;height: 50px;object-fit: cover;border-radius: 50%;" />
|
||||
<p>小米bbᯤ²ᴳ</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user