From 7f199e6c2f3bb408151025885014d47736478fd2 Mon Sep 17 00:00:00 2001
From: wanglin2 <1013335014@qq.com>
Date: Tue, 22 Aug 2023 09:54:41 +0800
Subject: [PATCH] Doc: update
---
README.md | 4 ++++
simple-mind-map/package.json | 2 +-
web/src/assets/avatar/小米.jpg | Bin 0 -> 42236 bytes
web/src/pages/Doc/en/changelog/index.md | 18 ++++++++++++++++++
web/src/pages/Doc/en/changelog/index.vue | 15 +++++++++++++++
web/src/pages/Doc/en/constructor/index.md | 1 +
web/src/pages/Doc/en/constructor/index.vue | 7 +++++++
web/src/pages/Doc/en/doExport/index.md | 2 +-
web/src/pages/Doc/en/doExport/index.vue | 2 +-
web/src/pages/Doc/en/introduction/index.md | 4 ++++
web/src/pages/Doc/en/introduction/index.vue | 4 ++++
web/src/pages/Doc/zh/changelog/index.md | 18 ++++++++++++++++++
web/src/pages/Doc/zh/changelog/index.vue | 15 +++++++++++++++
web/src/pages/Doc/zh/constructor/index.md | 1 +
web/src/pages/Doc/zh/constructor/index.vue | 7 +++++++
web/src/pages/Doc/zh/course17/index.md | 2 ++
web/src/pages/Doc/zh/course17/index.vue | 3 +++
web/src/pages/Doc/zh/doExport/index.md | 2 +-
web/src/pages/Doc/zh/doExport/index.vue | 2 +-
web/src/pages/Doc/zh/introduction/index.md | 4 ++++
web/src/pages/Doc/zh/introduction/index.vue | 4 ++++
21 files changed, 112 insertions(+), 5 deletions(-)
create mode 100644 web/src/assets/avatar/小米.jpg
diff --git a/README.md b/README.md
index 0e52b3a1..f2a9e985 100644
--- a/README.md
+++ b/README.md
@@ -153,4 +153,8 @@ const mindMap = new MindMap({
才镇
+
+
+ 小米bbᯤ²ᴳ
+
5<+}6o#*Cl{Z~b$B4Z^cJ^x0DlVez1tIsl}%3WJ+{
z3h(s{j_DIt6W?5dm_!HDGzdtLy?de)#Neqhj0Jmek7F$CZ0y6J9#cBPZSb({sl%n^
zjeb)-oHr4F*FR_tF%uk)?#tyj&M6< 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. Fix: Fixed an issue where rich text nodes cannot be displayed in Firefox browser. 才镇 小米bbᯤ²ᴳ 才镇 小米bbᯤ²ᴳ 修复: 1.优化富文本测量元素的逻辑,删除样式的重复设置和节点的重复添加。 2.优化导出图片逻辑,遍历节点转换图片的url时,如果已经是data:URL形式不重复处理。 新增: 1.去除导出svg方法的第二个参数,改为通过实例化配置。 2.导出图片不再使用外部库。 Demo: 1.修复单独编辑大纲时能给根节点添加兄弟节点的bug。 修复:修复在Firefox浏览器中富文本节点无法显示的问题。 如果开启了节点富文本编辑,也就是 在v0.6.16+版本后,plusCssText参数已被删除,改为在实例化时通过 才镇 小米bbᯤ²ᴳ 才镇 小米bbᯤ²ᴳeb5f?LJ#A
Changelog
+0.6.16
+
+
+
+
+
+
0.6.15-fix.2
0.6.15-fix.1
diff --git a/web/src/pages/Doc/en/constructor/index.md b/web/src/pages/Doc/en/constructor/index.md
index 91cd3077..1ee06622 100644
--- a/web/src/pages/Doc/en/constructor/index.md
+++ b/web/src/pages/Doc/en/constructor/index.md
@@ -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
diff --git a/web/src/pages/Doc/en/constructor/index.vue b/web/src/pages/Doc/en/constructor/index.vue
index 080f823e..312dc863 100644
--- a/web/src/pages/Doc/en/constructor/index.vue
+++ b/web/src/pages/Doc/en/constructor/index.vue
@@ -413,6 +413,13 @@
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
diff --git a/web/src/pages/Doc/en/doExport/index.md b/web/src/pages/Doc/en/doExport/index.md
index 78b6c73a..4a2f2c21 100644
--- a/web/src/pages/Doc/en/doExport/index.md
+++ b/web/src/pages/Doc/en/doExport/index.md
@@ -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(
diff --git a/web/src/pages/Doc/en/doExport/index.vue b/web/src/pages/Doc/en/doExport/index.vue
index 60dfa070..ee0db902 100644
--- a/web/src/pages/Doc/en/doExport/index.vue
+++ b/web/src/pages/Doc/en/doExport/index.vue
@@ -46,7 +46,7 @@ a.click()
name:svg titleplusCssText: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:svg(
diff --git a/web/src/pages/Doc/en/introduction/index.md b/web/src/pages/Doc/en/introduction/index.md
index 7b9a4d31..4f352423 100644
--- a/web/src/pages/Doc/en/introduction/index.md
+++ b/web/src/pages/Doc/en/introduction/index.md
@@ -169,4 +169,8 @@ Open source is not easy. If this project is helpful to you, you can invite the a
+
+ Changelog
+0.6.16
+
+
+
+
+
+
0.6.15-fix.2
0.6.15-fix.1
diff --git a/web/src/pages/Doc/zh/constructor/index.md b/web/src/pages/Doc/zh/constructor/index.md
index 91772aad..44405f83 100644
--- a/web/src/pages/Doc/zh/constructor/index.md
+++ b/web/src/pages/Doc/zh/constructor/index.md
@@ -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节点的默认样式覆盖,如果不覆盖,节点内容会发生偏移 | |
### 水印配置
diff --git a/web/src/pages/Doc/zh/constructor/index.vue b/web/src/pages/Doc/zh/constructor/index.vue
index 76d413a8..9bdca7d5 100644
--- a/web/src/pages/Doc/zh/constructor/index.vue
+++ b/web/src/pages/Doc/zh/constructor/index.vue
@@ -413,6 +413,13 @@
禁止鼠标滚轮缩放,你仍旧可以使用api进行缩放
+
+
resetCss(v0.6.16+)
+String
+* { margin: 0; padding: 0; box-sizing: border-box; }
+设置导出图片和svg时,针对富文本节点内容,也就是嵌入到svg中的html节点的默认样式覆盖,如果不覆盖,节点内容会发生偏移
+
+ 水印配置
diff --git a/web/src/pages/Doc/zh/course17/index.md b/web/src/pages/Doc/zh/course17/index.md
index 4a1a881f..6765cff2 100644
--- a/web/src/pages/Doc/zh/course17/index.md
+++ b/web/src/pages/Doc/zh/course17/index.md
@@ -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',
diff --git a/web/src/pages/Doc/zh/course17/index.vue b/web/src/pages/Doc/zh/course17/index.vue
index 90eef0f0..87a8a9bd 100644
--- a/web/src/pages/Doc/zh/course17/index.vue
+++ b/web/src/pages/Doc/zh/course17/index.vue
@@ -46,6 +46,9 @@ mindMap.export('pdf', mindMap.export(type, isDownload, fileName, plusCssText = '')
svg中会存在节点的html结构,这就又存在一个问题,因为浏览器对每个元素默认会设置一些样式,影响最大的就是margin和padding,这就有可能会导致节点中的文字错位,所以可以通过plusCssText参数传入css样式:
+
resetCss配置传入。mindMap.export(
'svg',
true,
diff --git a/web/src/pages/Doc/zh/doExport/index.md b/web/src/pages/Doc/zh/doExport/index.md
index 53a8b373..aa8904e9 100644
--- a/web/src/pages/Doc/zh/doExport/index.md
+++ b/web/src/pages/Doc/zh/doExport/index.md
@@ -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(
diff --git a/web/src/pages/Doc/zh/doExport/index.vue b/web/src/pages/Doc/zh/doExport/index.vue
index 24fe77b3..ecc32688 100644
--- a/web/src/pages/Doc/zh/doExport/index.vue
+++ b/web/src/pages/Doc/zh/doExport/index.vue
@@ -46,7 +46,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节点,想要设置一些针对节点的样式可以通过这个参数传入,比如:svg(
diff --git a/web/src/pages/Doc/zh/introduction/index.md b/web/src/pages/Doc/zh/introduction/index.md
index 931738ef..34b9c23b 100644
--- a/web/src/pages/Doc/zh/introduction/index.md
+++ b/web/src/pages/Doc/zh/introduction/index.md
@@ -162,4 +162,8 @@
+
+