Compare commits

...

69 Commits

Author SHA1 Message Date
街角小林
3593990f9b 打包0.9.3 2024-01-05 14:51:48 +08:00
街角小林
eec99c1c43 Doc: update 2024-01-05 14:47:05 +08:00
街角小林
06a777eb64 Merge branch 'feature' into main 2024-01-05 13:51:20 +08:00
街角小林
e3cb7b0a6b Fix:修复导出图片时节点连线的箭头、关联线的箭头、渐变背景丢失的问题 2024-01-05 13:50:05 +08:00
街角小林
163ae6caae Feat:优化节点渐变背景逻辑 2024-01-05 12:19:52 +08:00
街角小林
78d677a00c Merge pull request #510 from lxr-cel/main
Feature: 节点渐变色背景功能实现
2024-01-05 11:06:34 +08:00
街角小林
3a1615f041 Merge pull request #508 from HappyYang233/feature_compatible_qiankun
兼容微前端框架子应用使用此框架时,new MouseEvent函数,view字段取得proxyWindow导致构造失败的问题
2024-01-05 09:16:18 +08:00
街角小林
166f2e0a73 Doc: update 2024-01-05 09:14:30 +08:00
lxr-cel
c62089adb9 节点渐变色web示例更新 2024-01-04 23:37:27 +08:00
lxr-cel
130acff77c 节点渐变色功能实现 2024-01-04 23:36:22 +08:00
lxr-cel
c4713097a0 节点渐变色web示例更新 2024-01-04 23:28:19 +08:00
lxr-cel
c50f278ec1 Merge branch 'wanglin2:main' into main 2024-01-04 22:33:31 +08:00
lxr-cel
9af630e578 节点背景渐变色实现 2024-01-04 22:21:53 +08:00
街角小林
541606b2eb Feat:新增节点数据更新明细事件 2024-01-04 09:39:44 +08:00
HappyYang233
0784eab6d1 兼容微前端框架子应用使用此框架时,new MouseEvent函数,view字段取得proxyWindow导致构造失败的问题 2024-01-03 19:26:10 +08:00
街角小林
1ad1538699 库不再导入katex的css文件,由使用方导入 2024-01-03 18:04:19 +08:00
街角小林
a488b436ee 打包库时自动更新版本号 2024-01-03 17:56:35 +08:00
街角小林
3a6a2544b2 Doc: update 2024-01-03 17:29:22 +08:00
wanglin2
1bb7e431fb Demo:代码优化 2023-12-29 22:04:56 +08:00
wanglin2
0cfa21d4e6 Feat:增加对节点非富文本编辑时的粘贴的拦截操作 2023-12-29 22:02:15 +08:00
街角小林
1409b07fb3 Feat:节点富文本编辑中,如果粘贴的是smm格式的数据,那么取出第一个节点的纯文本进行粘贴 2023-12-29 17:46:58 +08:00
街角小林
c0fb1e8db8 Demo:公式katex库的配置从simple-mind-map库中获取 2023-12-29 16:48:23 +08:00
街角小林
eb50b70214 Fix:修复Chrome低版本公式无法渲染的问题 2023-12-29 16:47:30 +08:00
wanglin2
794d3e9a53 Fix:修复safari浏览器节点存在图标时文字位置错位的问题 2023-12-28 21:36:45 +08:00
街角小林
f087b7102e Fix:优化节点存在超链接、备注时在firefox浏览器中导出图片的宽高不之前的问题 2023-12-28 18:49:31 +08:00
街角小林
ee97731e18 Feat:设置节点文本命令的第二个参数如果没有传递,会使用之前的值 2023-12-28 17:30:58 +08:00
街角小林
7196c37e9a Doc: update 2023-12-28 09:27:43 +08:00
街角小林
2a85a03889 Feat:导出pdf从jspdf库改为pdf-lib库 2023-12-28 09:27:34 +08:00
街角小林
8b99a6c191 Doc: update 2023-12-27 09:57:25 +08:00
街角小林
6d378ca2e5 打包0.9.2 2023-12-26 18:33:29 +08:00
街角小林
5739fae4f7 Doc: update 2023-12-26 18:26:45 +08:00
街角小林
06ad8cfbf6 Feat:最大历史记录数量默认调整为500 2023-12-26 17:18:45 +08:00
街角小林
aed8e24afc Fix:修复节点数量过多,画布尺寸过大无法导出png和pdf的问题 2023-12-26 12:20:12 +08:00
街角小林
b7cb52b703 Fix:修复node_dragging事件回参里没有node实例的问题 2023-12-26 11:50:00 +08:00
街角小林
d4fc37fc98 Merge branch 'feature' of https://github.com/wanglin2/mind-map into feature 2023-12-26 10:23:46 +08:00
街角小林
7b4bd6b0bb Demo:基础样式配置连线支持显示箭头 2023-12-26 10:23:37 +08:00
街角小林
80f8a357fe Feat:节点连线支持显示箭头 2023-12-26 10:23:15 +08:00
wanglin2
a66cced73c Feat:去除导出pdf的特别处理 2023-12-25 20:50:50 +08:00
街角小林
29c5075fa5 Feat:重构pdf的导出逻辑,导出的pdf尺寸不再是固定的a4,而是思维导图的尺寸,同时取出分页导出的配置 2023-12-25 19:16:44 +08:00
街角小林
5bea2606f6 Fix:修复节点富文本编辑时,文本选中范围为null时没有触发rich_text_selection_change事件的问题 2023-12-25 18:10:51 +08:00
街角小林
9db988e3ec Fix:修复节点文本编辑状态中鼠标选择文本时移除编辑框,文字选中状态会丢失的问题 2023-12-25 18:09:25 +08:00
街角小林
bac174c8df Feat:新增自定义节点粘贴图片时的处理函数选项 2023-12-25 17:39:51 +08:00
街角小林
c0db185ca6 Doc: update 2023-12-25 17:25:37 +08:00
街角小林
642f486841 Doc: update 2023-12-25 17:25:17 +08:00
街角小林
69a97d44bc Fix:修复插入格式报错的问题 2023-12-25 16:30:29 +08:00
街角小林
d19fd7e186 Demo:支持配置仅在导出时显示水印 2023-12-25 10:13:13 +08:00
街角小林
2bcf763ea2 Feat:支持仅在导出时显示水印的配置选项 2023-12-25 10:12:43 +08:00
街角小林
9ea36a852f Fix:修复当节点数量比较多时,导出的图片中水印没有完全覆盖整个图片的问题 2023-12-25 09:36:06 +08:00
街角小林
4d2665c98b 优化部分插件代码,增加解绑事件的逻辑 2023-12-21 17:06:40 +08:00
街角小林
33a2e20ee2 Doc: update 2023-12-21 16:27:48 +08:00
街角小林
7b8946bec4 Demo:显示和移除滚动条时同时进行滚动条插件的注册和移除 2023-12-21 12:09:10 +08:00
街角小林
88f2e60720 Feat:收起所有节点操作将思维导图移至画布中心 2023-12-21 12:03:30 +08:00
街角小林
b4e0ad6881 Feat:支持配置注册了滚动条插件的情况下是否限制将思维导图限制在画布内 2023-12-21 12:01:00 +08:00
街角小林
d80ee1e7c8 Fix:修复当画布容器距浏览器窗口左上角不为0时,fit方法计算出来的位置有误差的问题 2023-12-21 11:25:08 +08:00
街角小林
3d0b257325 Feat:新增将思维导图图形限制在画布内的配置选项 2023-12-21 11:24:24 +08:00
街角小林
4d9aa1d3c2 Fix:修复拖拽画布时鼠标在节点上面松开时拖拽无法停止的问题 2023-12-21 10:32:45 +08:00
街角小林
abc30da43b Fix:修复滚动条插件在initRootNodePosition配置不为默认的center,center时位置计算错误的问题 2023-12-19 09:41:43 +08:00
街角小林
f887b14d1f Doc: update 2023-12-18 10:47:14 +08:00
街角小林
346e5b4ac8 Feat:render实例的paste方法改为支持粘贴剪贴板的数据 2023-12-18 10:35:19 +08:00
街角小林
6f7bb40c49 Fix:修复节点被销毁时鼠标移入标志没有复位的问题 2023-12-18 09:20:03 +08:00
街角小林
f3694d0c00 Merge branch 'feature' of https://github.com/wanglin2/mind-map into feature 2023-12-18 09:12:24 +08:00
街角小林
f2fbde3763 Doc: update 2023-12-18 09:12:15 +08:00
街角小林
b950c2bfe9 textEdit类增加isShowTextEdit方法判断当前是否处在节点编辑状态 2023-12-18 09:12:04 +08:00
wanglin2
69a7deedd7 Feat:修改mousewheel事件,dir标志修改为dirs,支持存储多个方向,优化触控板的双指移动操作 2023-12-17 21:32:13 +08:00
wanglin2
63b04e5acc Fix:修复鼠标或触控板水平滚动时画布移动方向相反的问题 2023-12-17 20:56:41 +08:00
街角小林
4a2816fc75 Fix:修复当节点数量超出了缓存池的最大数量时,前进回退会导致节点重复渲染的问题 2023-12-15 11:46:41 +08:00
街角小林
42ffbd728c Feat:优化reRender方法 2023-12-15 09:29:41 +08:00
街角小林
0ec16bd136 Feat:修复导入含有和当前画布已有节点uid相同的文件时会重复绘制节点的问题 2023-12-14 17:17:25 +08:00
街角小林
d517ee338f Fix:修复节点文本含有连续的数字或字母时没有换行的问题 2023-12-14 08:49:13 +08:00
234 changed files with 2971 additions and 1856 deletions

View File

@@ -7,7 +7,7 @@
[![GitHub forks](https://img.shields.io/github/forks/wanglin2/mind-map)](https://github.com/wanglin2/mind-map/network/members)
![license](https://img.shields.io/npm/l/express.svg)
> 一个简单&强大的Web思维导图
> 一个简单&强大的 Web 思维导图
本项目包含两部分:
@@ -27,6 +27,8 @@ Github[releases](https://github.com/wanglin2/mind-map/releases)。
> 客户端版本会落后于在线版本,尝试最新功能请优先使用在线版。
> 如果访问 github 比较慢可以使用http://lxqnsys.com/simple-mind-map/#/index
# 特性
- [x] 插件化架构,除核心功能外,其他功能作为插件提供,按需使用,减小打包体积
@@ -35,7 +37,7 @@ Github[releases](https://github.com/wanglin2/mind-map/releases)。
- [x] 节点内容支持文本(普通文本、富文本)、图片、图标、超链接、备注、标签、概要、数学公式
- [x] 节点支持拖拽(拖拽移动、自由调整)、多种节点形状,支持使用 DDM 完全自定义节点内容
- [x] 支持画布拖动、缩放
- [x] 支持鼠标按键拖动选择和Ctrl+左键两种多选节点方式
- [x] 支持鼠标按键拖动选择和 Ctrl+左键两种多选节点方式
- [x] 支持导出为`json``png``svg``pdf``markdown``xmind`,支持从`json``xmind``markdown`导入
- [x] 支持快捷键、前进后退、关联线、搜索替换、小地图、水印、滚动条
- [x] 提供丰富的配置,满足各种场景各种使用习惯
@@ -49,7 +51,7 @@ npm i simple-mind-map
# 使用
提供一个宽高不为0的容器元素:
提供一个宽高不为 0 的容器元素:
```html
<div id="mindMapContainer"></div>
@@ -70,13 +72,13 @@ npm i simple-mind-map
import MindMap from "simple-mind-map";
const mindMap = new MindMap({
el: document.getElementById('mindMapContainer'),
el: document.getElementById("mindMapContainer"),
data: {
"data": {
"text": "根节点"
data: {
text: "根节点",
},
"children": []
}
children: [],
},
});
```
@@ -238,4 +240,16 @@ const mindMap = new MindMap({
<img src="./web/src/assets/avatar/HaHN.jpg" style="width: 50px;height: 50px;" />
<span>HaHN</span>
</span>
</p>
<span>
<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>欣</span>
</span>
<span>
<img src="./web/src/assets/avatar/default.png" style="width: 50px;height: 50px;" />
<span>易空小易</span>
</span>
</p>

File diff suppressed because one or more lines are too long

BIN
dist/fonts/KaTeX_AMS-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_AMS-Regular.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_AMS-Regular.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Caligraphic-Bold.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Caligraphic-Bold.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Caligraphic-Bold.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Caligraphic-Regular.ttf vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
dist/fonts/KaTeX_Fraktur-Bold.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Fraktur-Bold.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Fraktur-Bold.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Fraktur-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Fraktur-Regular.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Fraktur-Regular.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-Bold.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-Bold.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-Bold.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-BoldItalic.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-BoldItalic.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-BoldItalic.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-Italic.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-Italic.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-Italic.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-Regular.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-Regular.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Math-BoldItalic.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Math-BoldItalic.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Math-BoldItalic.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Math-Italic.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Math-Italic.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Math-Italic.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_SansSerif-Bold.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_SansSerif-Bold.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_SansSerif-Bold.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_SansSerif-Italic.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_SansSerif-Italic.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_SansSerif-Italic.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_SansSerif-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_SansSerif-Regular.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_SansSerif-Regular.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Script-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Script-Regular.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Script-Regular.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size1-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size1-Regular.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size1-Regular.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size2-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size2-Regular.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size2-Regular.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size3-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size3-Regular.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size4-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size4-Regular.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size4-Regular.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Typewriter-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Typewriter-Regular.woff vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
dist/img/欣.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
dist/img/继龙.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

2
dist/js/app.js vendored

File diff suppressed because one or more lines are too long

83
dist/js/chunk-1066cf58.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0abe0f"],{"16c7":function(t,e,o){"use strict";o.r(e);var a=function(){var t=this;t._self._c;return t._m(0)},n=[function(){var t=this,e=t._self._c;return e("div",[e("h1",[t._v("View instance")]),e("p",[t._v("The "),e("code",[t._v("view")]),t._v(" instance is responsible for view operations, and can be obtained through "),e("code",[t._v("mindMap.view")])]),e("h2",[t._v("Methods")]),e("h3",[t._v("fit()")]),e("blockquote",[e("p",[t._v("v0.6.0+")])]),e("p",[t._v("Zoom the mind map to fit the canvas.")]),e("h3",[t._v("translateX(step)")]),e("p",[t._v("Translate in the "),e("code",[t._v("x")]),t._v(" direction, "),e("code",[t._v("step")]),t._v(": number of pixels to translate")]),e("h3",[t._v("translateY(step)")]),e("p",[t._v("Translate in the "),e("code",[t._v("y")]),t._v(" direction, "),e("code",[t._v("step")]),t._v(": number of pixels to translate")]),e("h3",[t._v("translateXTo(x)")]),e("blockquote",[e("p",[t._v("v0.2.11+")])]),e("p",[t._v("Translate the "),e("code",[t._v("x")]),t._v(" direction to a specific position")]),e("h3",[t._v("translateYTo(y)")]),e("blockquote",[e("p",[t._v("v0.2.11+")])]),e("p",[t._v("Translate the "),e("code",[t._v("y")]),t._v(" direction to a specific position")]),e("h3",[t._v("reset()")]),e("p",[t._v("Revert to the default transformation")]),e("h3",[t._v("narrow(cx, cy)")]),e("ul",[e("li",[e("p",[e("code",[t._v("cx")]),t._v(":v0.6.4+Zoom to the specified position on the canvas, default to the center point of the canvas")])]),e("li",[e("p",[e("code",[t._v("cy")]),t._v(":v0.6.4+Zoom to the specified position on the canvas, default to the center point of the canvas")])])]),e("p",[t._v("Zoom out")]),e("h3",[t._v("enlarge(cx, cy)")]),e("ul",[e("li",[e("p",[e("code",[t._v("cx")]),t._v(":v0.6.4+Zoom to the specified position on the canvas, default to the center point of the canvas")])]),e("li",[e("p",[e("code",[t._v("cy")]),t._v(":v0.6.4+Zoom to the specified position on the canvas, default to the center point of the canvas")])])]),e("p",[t._v("Zoom in")]),e("h3",[t._v("getTransformData()")]),e("blockquote",[e("p",[t._v("v0.1.1+")])]),e("p",[t._v("Get the current transform data, can be used for display")]),e("h3",[t._v("setTransformData(data)")]),e("blockquote",[e("p",[t._v("v0.1.1+")])]),e("p",[t._v('Dynamically set transform data, transform data can be obtained through the getTransformData method"')]),e("h3",[t._v("setScale(scale, cx, cy)")]),e("blockquote",[e("p",[t._v("v0.2.17+")])]),e("ul",[e("li",[e("p",[e("code",[t._v("cx")]),t._v(":v0.6.4+Zoom to the specified position on the canvas, default to the center point of the canvas")])]),e("li",[e("p",[e("code",[t._v("cy")]),t._v(":v0.6.4+Zoom to the specified position on the canvas, default to the center point of the canvas")])])]),e("p",[t._v("Setting Zoom")])])}],v={},c=v,i=o("2877"),s=Object(i["a"])(c,a,n,!1,null,null,null);e["default"]=s.exports}}]);
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0abe0f"],{"16c7":function(e,t,o){"use strict";o.r(t);var a=function(){var e=this;e._self._c;return e._m(0)},n=[function(){var e=this,t=e._self._c;return t("div",[t("h1",[e._v("View instance")]),t("p",[e._v("The "),t("code",[e._v("view")]),e._v(" instance is responsible for view operations, and can be obtained through "),t("code",[e._v("mindMap.view")])]),t("h2",[e._v("Methods")]),t("h3",[e._v("fit()")]),t("blockquote",[t("p",[e._v("v0.6.0+")])]),t("p",[e._v("Zoom the mind map to fit the canvas.")]),t("p",[e._v("Note that this method cannot be called immediately after calling the 'setData' and 'setFullData' methods, and needs to listen to the 'node_tree_render_end' event calls 'fit'.")]),t("h3",[e._v("translateX(step)")]),t("p",[e._v("Translate in the "),t("code",[e._v("x")]),e._v(" direction, "),t("code",[e._v("step")]),e._v(": number of pixels to translate")]),t("h3",[e._v("translateY(step)")]),t("p",[e._v("Translate in the "),t("code",[e._v("y")]),e._v(" direction, "),t("code",[e._v("step")]),e._v(": number of pixels to translate")]),t("h3",[e._v("translateXTo(x)")]),t("blockquote",[t("p",[e._v("v0.2.11+")])]),t("p",[e._v("Translate the "),t("code",[e._v("x")]),e._v(" direction to a specific position")]),t("h3",[e._v("translateYTo(y)")]),t("blockquote",[t("p",[e._v("v0.2.11+")])]),t("p",[e._v("Translate the "),t("code",[e._v("y")]),e._v(" direction to a specific position")]),t("h3",[e._v("reset()")]),t("p",[e._v("Revert to the default transformation")]),t("h3",[e._v("narrow(cx, cy)")]),t("ul",[t("li",[t("p",[t("code",[e._v("cx")]),e._v(":v0.6.4+Zoom to the specified position on the canvas, default to the center point of the canvas")])]),t("li",[t("p",[t("code",[e._v("cy")]),e._v(":v0.6.4+Zoom to the specified position on the canvas, default to the center point of the canvas")])])]),t("p",[e._v("Zoom out")]),t("h3",[e._v("enlarge(cx, cy)")]),t("ul",[t("li",[t("p",[t("code",[e._v("cx")]),e._v(":v0.6.4+Zoom to the specified position on the canvas, default to the center point of the canvas")])]),t("li",[t("p",[t("code",[e._v("cy")]),e._v(":v0.6.4+Zoom to the specified position on the canvas, default to the center point of the canvas")])])]),t("p",[e._v("Zoom in")]),t("h3",[e._v("getTransformData()")]),t("blockquote",[t("p",[e._v("v0.1.1+")])]),t("p",[e._v("Get the current transform data, can be used for display")]),t("h3",[e._v("setTransformData(data)")]),t("blockquote",[t("p",[e._v("v0.1.1+")])]),t("p",[e._v('Dynamically set transform data, transform data can be obtained through the getTransformData method"')]),t("h3",[e._v("setScale(scale, cx, cy)")]),t("blockquote",[t("p",[e._v("v0.2.17+")])]),t("ul",[t("li",[t("p",[t("code",[e._v("cx")]),e._v(":v0.6.4+Zoom to the specified position on the canvas, default to the center point of the canvas")])]),t("li",[t("p",[t("code",[e._v("cy")]),e._v(":v0.6.4+Zoom to the specified position on the canvas, default to the center point of the canvas")])])]),t("p",[e._v("Setting Zoom")])])}],v={},i=v,c=o("2877"),s=Object(c["a"])(i,a,n,!1,null,null,null);t["default"]=s.exports}}]);

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b361e"],{"27ad":function(s,a,t){"use strict";t.r(a);var e=function(){var s=this;s._self._c;return s._m(0)},n=[function(){var s=this,a=s._self._c;return a("div",[a("h1",[s._v("Watermark plugin")]),a("blockquote",[a("p",[s._v("0.2.24+")])]),a("p",[a("code",[s._v("Watermark")]),s._v(" instance is responsible for displaying the watermark.")]),a("p",[s._v("Please refer to the "),a("a",{attrs:{href:"/mind-map/#/doc/zh/constructor"}},[s._v("Instantiation Options")]),s._v(" of the "),a("code",[s._v("MindMap")]),s._v(" class for configuration.")]),a("h2",[s._v("Register")]),a("pre",{staticClass:"hljs"},[a("code",[a("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" MindMap "),a("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),a("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map'")]),s._v("\n"),a("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" Watermark "),a("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),a("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/plugins/Watermark.js'")]),s._v("\n"),a("span",{staticClass:"hljs-comment"},[s._v("// import Watermark from 'simple-mind-map/src/Watermark.js' Use this path for versions below v0.6.0")]),s._v("\n\nMindMap.usePlugin(Watermark)\n")])]),a("p",[s._v("After registration and instantiation of "),a("code",[s._v("MindMap")]),s._v(", the instance can be obtained through "),a("code",[s._v("mindMap.watermark")]),s._v(".")]),a("h2",[s._v("Methods")]),a("h3",[s._v("draw()")]),a("p",[s._v("Redraw the watermark.")]),a("p",[s._v("Note: For imprecise rendering, some watermarks beyond the visible area will be drawn. If you have extreme performance requirements, it is recommended to develop the watermark function yourself.")]),a("h3",[s._v("updateWatermark(config)")]),a("p",[s._v("Update watermark config. Example:")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.watermark.updateWatermark({\n "),a("span",{staticClass:"hljs-attr"},[s._v("text")]),s._v(": "),a("span",{staticClass:"hljs-string"},[s._v("'Watermark text'")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("lineSpacing")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("100")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("textSpacing")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("100")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("angle")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("50")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("textStyle")]),s._v(": {\n "),a("span",{staticClass:"hljs-attr"},[s._v("color")]),s._v(": "),a("span",{staticClass:"hljs-string"},[s._v("'#000'")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("opacity")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("1")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("fontSize")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("20")]),s._v("\n }\n})\n")])]),a("h3",[s._v("hasWatermark()")]),a("blockquote",[a("p",[s._v("v0.3.2+")])]),a("p",[s._v("Gets whether the watermark exists.")])])}],r={},i=r,l=t("2877"),v=Object(l["a"])(i,e,n,!1,null,null,null);a["default"]=v.exports}}]);
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b361e"],{"27ad":function(s,a,t){"use strict";t.r(a);var e=function(){var s=this;s._self._c;return s._m(0)},r=[function(){var s=this,a=s._self._c;return a("div",[a("h1",[s._v("Watermark plugin")]),a("blockquote",[a("p",[s._v("0.2.24+")])]),a("p",[a("code",[s._v("Watermark")]),s._v(" instance is responsible for displaying the watermark.")]),a("p",[s._v("Please refer to the "),a("a",{attrs:{href:"/mind-map/#/doc/zh/constructor"}},[s._v("Instantiation Options")]),s._v(" of the "),a("code",[s._v("MindMap")]),s._v(" class for configuration.")]),a("h2",[s._v("Register")]),a("pre",{staticClass:"hljs"},[a("code",[a("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" MindMap "),a("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),a("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map'")]),s._v("\n"),a("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" Watermark "),a("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),a("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/plugins/Watermark.js'")]),s._v("\n"),a("span",{staticClass:"hljs-comment"},[s._v("// import Watermark from 'simple-mind-map/src/Watermark.js' Use this path for versions below v0.6.0")]),s._v("\n\nMindMap.usePlugin(Watermark)\n")])]),a("p",[s._v("After registration and instantiation of "),a("code",[s._v("MindMap")]),s._v(", the instance can be obtained through "),a("code",[s._v("mindMap.watermark")]),s._v(".")]),a("h2",[s._v("Methods")]),a("h3",[s._v("draw()")]),a("p",[s._v("Redraw the watermark.")]),a("p",[s._v("Note: For imprecise rendering, some watermarks beyond the visible area will be drawn. If you have extreme performance requirements, it is recommended to develop the watermark function yourself.")]),a("h3",[s._v("updateWatermark(config)")]),a("p",[s._v("Update watermark config. Example:")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.watermark.updateWatermark({\n "),a("span",{staticClass:"hljs-attr"},[s._v("text")]),s._v(": "),a("span",{staticClass:"hljs-string"},[s._v("'Watermark text'")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("lineSpacing")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("100")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("textSpacing")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("100")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("angle")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("50")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("textStyle")]),s._v(": {\n "),a("span",{staticClass:"hljs-attr"},[s._v("color")]),s._v(": "),a("span",{staticClass:"hljs-string"},[s._v("'#000'")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("opacity")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("1")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("fontSize")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("20")]),s._v("\n }\n})\n")])]),a("h3",[s._v("hasWatermark()")]),a("blockquote",[a("p",[s._v("v0.3.2+")])]),a("p",[s._v("Gets whether the watermark exists.")]),a("h3",[s._v("clear()")]),a("blockquote",[a("p",[s._v("v0.9.2+")])]),a("p",[s._v("Clear watermark.")])])}],n={},i=n,l=t("2877"),v=Object(l["a"])(i,e,r,!1,null,null,null);a["default"]=v.exports}}]);

View File

@@ -1 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b9b64"],{"33b0":function(t,s,a){"use strict";a.r(s);var n=function(){var t=this;t._self._c;return t._m(0)},i=[function(){var t=this,s=t._self._c;return s("div",[s("h1",[t._v("结构")]),s("p",[s("code",[t._v("simple-mind-map")]),t._v("目前支持四种结构logicalStructure逻辑结构图、mindMap思维导图、organizationStructure组织结构图、catalogOrganization目录组织图、timeline时间轴、timeline2时间轴2、fishbone鱼骨图、verticalTimelinev0.6.6+竖向时间轴)。")]),s("p",[t._v("可以在实例化"),s("code",[t._v("simple-mind-map")]),t._v("时通过选项指定使用的结构:")]),s("pre",{staticClass:"hljs"},[s("code",[s("span",{staticClass:"hljs-keyword"},[t._v("new")]),t._v(" MindMap({\n "),s("span",{staticClass:"hljs-comment"},[t._v("// ...")]),t._v("\n "),s("span",{staticClass:"hljs-attr"},[t._v("layout")]),t._v(": "),s("span",{staticClass:"hljs-string"},[t._v("'logicalStructure'")]),t._v("\n})\n")])]),s("p",[t._v("也可以动态切换结构:")]),s("pre",{staticClass:"hljs"},[s("code",[t._v("mindMap.setLayout("),s("span",{staticClass:"hljs-string"},[t._v("'organizationStructure'")]),t._v(")\n")])]),s("p",[t._v("获取当前使用的结构可以使用"),s("code",[t._v("getLayout")]),t._v("方法:")]),s("pre",{staticClass:"hljs"},[s("code",[s("span",{staticClass:"hljs-keyword"},[t._v("const")]),t._v(" layout = mindMap.getLayout()\n")])]),s("h2",[t._v("完整示例")]),s("iframe",{staticStyle:{width:"100%",height:"455px",border:"none"},attrs:{src:"https://wanglin2.github.io/playground/#eNrFVVtrFDEU/iuHiMxWtrNb8Gndlnp7EFqR+tgUSWfS3WgmGSaZXiwLUgrWS0Hpg6Ag6os++ChCW8Q/0+72Z3iymZkd2z745sIsk3P5vpOc72S2yc00DddzTjqka6JMpBYMt3k6R5VIUp1Z2IaMrzVBq0WdK8vjJpg+k1JvLPE1GMBaphMIECGoMhaFihdZ6l2UGDRLPp2gdTphKSVUAVAluQVnc5GzoHIpvb3VgtNfB6cv9oe/nw1/HI/e75693BntHJ7uvTv7/I2qSCtjgUVWrPP7OuYGsycVNZZXpqjyKHvPh/tfRscHw4+7ZVrUZ6rHF7aYzi3mNaZgdg62HXFRSoi7X2Bb6G4EOusxJZ4yK7R6aLM8snnGA4QfOIbqQBoXUdyG+EZ5EI2xC4DLDsQ6yhOubNjj9q7k7vXW1r24ERSZt7WyTCieBVNNnxUzyzoe3f0ocQZKaiZvtnzTOjMlw0+H/sj8UbvfoABzgVFfyDjjygUvTzDOwV3Kcp7p5Oj16OjrebK/CS8hXZn46nH/qYLytbCVeUIJu6S1dRp7oI1wKsDMQPI1GzQhiLB12KaVIlyORdOBQOqeiJicCMb5B1M3vLoBUJmjD29P33z3RXuVnxy9Ojn+WdehVo1AIfUjr3RkbLhlE9z/gjB2IjqoT0O4zmTOnQCLOE+PosWn2/IzjtONC8txMJnluALoxmIdIsmMmaWkKOIOTzQlY3cRIOKJt5IqhnRb6K0HlkhWa7nKXIh3Uttdza3VCuYjKaInGFKfSYyrj2235YNL5IqlfOu2apvApbFb0u9nvriMKAlb/gYqpjHkJgkjYyipWhLW9lse6YaIbb8DM+321XEcQFqJIOPIiAc+doz1454r58+lhJokslWjZW59ImoGpdSBdrGyOp0sLtL3uej1Mfx6u51ulsyX814rmROW9QTylqgpi2OheqWhKj0s2vSPFc+UFRRFV2sERImNe0CaxHfA3fnhY6MVfmLG8LRwYAeq4aYEvyB+osMWvoYZXq0i4a5Z06uZ3jA8QxBKimm75Kvicy+22mUVtQ3I4A+xm1Zg"}})])}],e={},l=e,o=a("2877"),r=Object(o["a"])(l,n,i,!1,null,null,null);s["default"]=r.exports}}]);
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b9b64"],{"33b0":function(t,s,a){"use strict";a.r(s);var n=function(){var t=this;t._self._c;return t._m(0)},i=[function(){var t=this,s=t._self._c;return s("div",[s("h1",[t._v("结构")]),s("p",[s("code",[t._v("simple-mind-map")]),t._v("目前支持结构logicalStructure逻辑结构图、mindMap思维导图、organizationStructure组织结构图、catalogOrganization目录组织图、timeline时间轴、timeline2时间轴2、fishbone鱼骨图、verticalTimelinev0.6.6+竖向时间轴)。")]),s("p",[t._v("可以在实例化"),s("code",[t._v("simple-mind-map")]),t._v("时通过选项指定使用的结构:")]),s("pre",{staticClass:"hljs"},[s("code",[s("span",{staticClass:"hljs-keyword"},[t._v("new")]),t._v(" MindMap({\n "),s("span",{staticClass:"hljs-comment"},[t._v("// ...")]),t._v("\n "),s("span",{staticClass:"hljs-attr"},[t._v("layout")]),t._v(": "),s("span",{staticClass:"hljs-string"},[t._v("'logicalStructure'")]),t._v("\n})\n")])]),s("p",[t._v("也可以动态切换结构:")]),s("pre",{staticClass:"hljs"},[s("code",[t._v("mindMap.setLayout("),s("span",{staticClass:"hljs-string"},[t._v("'organizationStructure'")]),t._v(")\n")])]),s("p",[t._v("获取当前使用的结构可以使用"),s("code",[t._v("getLayout")]),t._v("方法:")]),s("pre",{staticClass:"hljs"},[s("code",[s("span",{staticClass:"hljs-keyword"},[t._v("const")]),t._v(" layout = mindMap.getLayout()\n")])]),s("h2",[t._v("完整示例")]),s("iframe",{staticStyle:{width:"100%",height:"455px",border:"none"},attrs:{src:"https://wanglin2.github.io/playground/#eNrFVVtrFDEU/iuHiMxWtrNb8Gndlnp7EFqR+tgUSWfS3WgmGSaZXiwLUgrWS0Hpg6Ag6os++ChCW8Q/0+72Z3iymZkd2z745sIsk3P5vpOc72S2yc00DddzTjqka6JMpBYMt3k6R5VIUp1Z2IaMrzVBq0WdK8vjJpg+k1JvLPE1GMBaphMIECGoMhaFihdZ6l2UGDRLPp2gdTphKSVUAVAluQVnc5GzoHIpvb3VgtNfB6cv9oe/nw1/HI/e75693BntHJ7uvTv7/I2qSCtjgUVWrPP7OuYGsycVNZZXpqjyKHvPh/tfRscHw4+7ZVrUZ6rHF7aYzi3mNaZgdg62HXFRSoi7X2Bb6G4EOusxJZ4yK7R6aLM8snnGA4QfOIbqQBoXUdyG+EZ5EI2xC4DLDsQ6yhOubNjj9q7k7vXW1r24ERSZt7WyTCieBVNNnxUzyzoe3f0ocQZKaiZvtnzTOjMlw0+H/sj8UbvfoABzgVFfyDjjygUvTzDOwV3Kcp7p5Oj16OjrebK/CS8hXZn46nH/qYLytbCVeUIJu6S1dRp7oI1wKsDMQPI1GzQhiLB12KaVIlyORdOBQOqeiJicCMb5B1M3vLoBUJmjD29P33z3RXuVnxy9Ojn+WdehVo1AIfUjr3RkbLhlE9z/gjB2IjqoT0O4zmTOnQCLOE+PosWn2/IzjtONC8txMJnluALoxmIdIsmMmaWkKOIOTzQlY3cRIOKJt5IqhnRb6K0HlkhWa7nKXIh3Uttdza3VCuYjKaInGFKfSYyrj2235YNL5IqlfOu2apvApbFb0u9nvriMKAlb/gYqpjHkJgkjYyipWhLW9lse6YaIbb8DM+321XEcQFqJIOPIiAc+doz1454r58+lhJokslWjZW59ImoGpdSBdrGyOp0sLtL3uej1Mfx6u51ulsyX814rmROW9QTylqgpi2OheqWhKj0s2vSPFc+UFRRFV2sERImNe0CaxHfA3fnhY6MVfmLG8LRwYAeq4aYEvyB+osMWvoYZXq0i4a5Z06uZ3jA8QxBKimm75Kvicy+22mUVtQ3I4A+xm1Zg"}})])}],e={},l=e,o=a("2877"),r=Object(o["a"])(l,n,i,!1,null,null,null);s["default"]=r.exports}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0dddce"],{"82ca":function(v,_,e){"use strict";e.r(_);var c=function(){var v=this;v._self._c;return v._m(0)},o=[function(){var v=this,_=v._self._c;return _("div",[_("h1",[v._v("View实例")]),_("p",[_("code",[v._v("view")]),v._v("实例负责视图操作,可通过"),_("code",[v._v("mindMap.view")]),v._v("获取到该实例")]),_("h2",[v._v("方法")]),_("h3",[v._v("fit()")]),_("blockquote",[_("p",[v._v("v0.6.0+")])]),_("p",[v._v("缩放思维导图至适应画布。")]),_("h3",[v._v("translateX(step)")]),_("p",[_("code",[v._v("x")]),v._v("方向进行平移,"),_("code",[v._v("step")]),v._v(":要平移的像素")]),_("h3",[v._v("translateY(step)")]),_("p",[_("code",[v._v("y")]),v._v("方向进行平移,"),_("code",[v._v("step")]),v._v(":要平移的像素")]),_("h3",[v._v("translateXTo(x)")]),_("blockquote",[_("p",[v._v("v0.2.11+")])]),_("p",[v._v("平移"),_("code",[v._v("x")]),v._v("方向到指定位置")]),_("h3",[v._v("translateYTo(y)")]),_("blockquote",[_("p",[v._v("v0.2.11+")])]),_("p",[v._v("平移"),_("code",[v._v("y")]),v._v("方向到指定位置")]),_("h3",[v._v("reset()")]),_("p",[v._v("恢复到默认的变换")]),_("h3",[v._v("narrow(cx, cy)")]),_("ul",[_("li",[_("p",[_("code",[v._v("cx")]),v._v("v0.6.4+)以画布指定位置进行缩放,默认为画布中心点")])]),_("li",[_("p",[_("code",[v._v("cy")]),v._v("v0.6.4+)以画布指定位置进行缩放,默认为画布中心点")])])]),_("p",[v._v("缩小")]),_("h3",[v._v("enlarge(cx, cy)")]),_("ul",[_("li",[_("p",[_("code",[v._v("cx")]),v._v("v0.6.4+)以画布指定位置进行缩放,默认为画布中心点")])]),_("li",[_("p",[_("code",[v._v("cy")]),v._v("v0.6.4+)以画布指定位置进行缩放,默认为画布中心点")])])]),_("p",[v._v("放大")]),_("h3",[v._v("getTransformData()")]),_("blockquote",[_("p",[v._v("v0.1.1+")])]),_("p",[v._v("获取当前变换数据,可用于回显")]),_("h3",[v._v("setTransformData(data)")]),_("blockquote",[_("p",[v._v("v0.1.1+")])]),_("p",[v._v("动态设置变换数据可以通过getTransformData方法获取变换数据")]),_("h3",[v._v("setScale(scale, cx, cy)")]),_("blockquote",[_("p",[v._v("v0.2.17+")])]),_("ul",[_("li",[_("p",[_("code",[v._v("cx")]),v._v("v0.6.4+)以画布指定位置进行缩放,默认为画布中心点")])]),_("li",[_("p",[_("code",[v._v("cy")]),v._v("v0.6.4+)以画布指定位置进行缩放,默认为画布中心点")])])]),_("p",[v._v("设置缩放")])])}],t={},p=t,a=e("2877"),l=Object(a["a"])(p,c,o,!1,null,null,null);_["default"]=l.exports}}]);
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0dddce"],{"82ca":function(v,_,e){"use strict";e.r(_);var c=function(){var v=this;v._self._c;return v._m(0)},t=[function(){var v=this,_=v._self._c;return _("div",[_("h1",[v._v("View实例")]),_("p",[_("code",[v._v("view")]),v._v("实例负责视图操作,可通过"),_("code",[v._v("mindMap.view")]),v._v("获取到该实例")]),_("h2",[v._v("方法")]),_("h3",[v._v("fit()")]),_("blockquote",[_("p",[v._v("v0.6.0+")])]),_("p",[v._v("缩放思维导图至适应画布。")]),_("p",[v._v("注意该方法不能在"),_("code",[v._v("setData")]),v._v("、"),_("code",[v._v("setFullData")]),v._v("方法调用后立即调用,需要监听"),_("code",[v._v("node_tree_render_end")]),v._v("事件调用"),_("code",[v._v("fit")]),v._v("。")]),_("h3",[v._v("translateX(step)")]),_("p",[_("code",[v._v("x")]),v._v("方向进行平移,"),_("code",[v._v("step")]),v._v(":要平移的像素")]),_("h3",[v._v("translateY(step)")]),_("p",[_("code",[v._v("y")]),v._v("方向进行平移,"),_("code",[v._v("step")]),v._v(":要平移的像素")]),_("h3",[v._v("translateXTo(x)")]),_("blockquote",[_("p",[v._v("v0.2.11+")])]),_("p",[v._v("平移"),_("code",[v._v("x")]),v._v("方向到指定位置")]),_("h3",[v._v("translateYTo(y)")]),_("blockquote",[_("p",[v._v("v0.2.11+")])]),_("p",[v._v("平移"),_("code",[v._v("y")]),v._v("方向到指定位置")]),_("h3",[v._v("reset()")]),_("p",[v._v("恢复到默认的变换")]),_("h3",[v._v("narrow(cx, cy)")]),_("ul",[_("li",[_("p",[_("code",[v._v("cx")]),v._v("v0.6.4+)以画布指定位置进行缩放,默认为画布中心点")])]),_("li",[_("p",[_("code",[v._v("cy")]),v._v("v0.6.4+)以画布指定位置进行缩放,默认为画布中心点")])])]),_("p",[v._v("缩小")]),_("h3",[v._v("enlarge(cx, cy)")]),_("ul",[_("li",[_("p",[_("code",[v._v("cx")]),v._v("v0.6.4+)以画布指定位置进行缩放,默认为画布中心点")])]),_("li",[_("p",[_("code",[v._v("cy")]),v._v("v0.6.4+)以画布指定位置进行缩放,默认为画布中心点")])])]),_("p",[v._v("放大")]),_("h3",[v._v("getTransformData()")]),_("blockquote",[_("p",[v._v("v0.1.1+")])]),_("p",[v._v("获取当前变换数据,可用于回显")]),_("h3",[v._v("setTransformData(data)")]),_("blockquote",[_("p",[v._v("v0.1.1+")])]),_("p",[v._v("动态设置变换数据可以通过getTransformData方法获取变换数据")]),_("h3",[v._v("setScale(scale, cx, cy)")]),_("blockquote",[_("p",[v._v("v0.2.17+")])]),_("ul",[_("li",[_("p",[_("code",[v._v("cx")]),v._v("v0.6.4+)以画布指定位置进行缩放,默认为画布中心点")])]),_("li",[_("p",[_("code",[v._v("cy")]),v._v("v0.6.4+)以画布指定位置进行缩放,默认为画布中心点")])])]),_("p",[v._v("设置缩放")])])}],o={},a=o,p=e("2877"),l=Object(p["a"])(a,c,t,!1,null,null,null);_["default"]=l.exports}}]);

View File

@@ -1 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0de01b"],{"848a":function(s,a,t){"use strict";t.r(a);var n=function(){var s=this;s._self._c;return s._m(0)},v=[function(){var s=this,a=s._self._c;return a("div",[a("h1",[s._v("Watermark插件")]),a("blockquote",[a("p",[s._v("0.2.24+")])]),a("p",[a("code",[s._v("Watermark")]),s._v("插件负责显示水印。")]),a("p",[s._v("配置请参考"),a("code",[s._v("MindMap")]),s._v("类的"),a("a",{attrs:{href:"/mind-map/#/doc/zh/constructor"}},[s._v("实例化选项")]),s._v("。")]),a("h2",[s._v("注册")]),a("pre",{staticClass:"hljs"},[a("code",[a("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" MindMap "),a("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),a("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map'")]),s._v("\n"),a("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" Watermark "),a("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),a("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/plugins/Watermark.js'")]),s._v("\n"),a("span",{staticClass:"hljs-comment"},[s._v("// import Watermark from 'simple-mind-map/src/Watermark.js' v0.6.0以下版本使用该路径")]),s._v("\n\nMindMap.usePlugin(Watermark)\n")])]),a("p",[s._v("注册完且实例化"),a("code",[s._v("MindMap")]),s._v("后可通过"),a("code",[s._v("mindMap.watermark")]),s._v("获取到该实例。")]),a("h2",[s._v("方法")]),a("h3",[s._v("draw()")]),a("p",[s._v("重新绘制水印。")]),a("p",[s._v("注意:非精确绘制,会绘制一些超出可视区域的水印,如果对性能有极致要求,推荐自行开发水印功能。")]),a("h3",[s._v("updateWatermark(config)")]),a("p",[s._v("更新水印配置。示例:")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.watermark.updateWatermark({\n "),a("span",{staticClass:"hljs-attr"},[s._v("text")]),s._v(": "),a("span",{staticClass:"hljs-string"},[s._v("'水印文字'")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("lineSpacing")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("100")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("textSpacing")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("100")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("angle")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("50")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("textStyle")]),s._v(": {\n "),a("span",{staticClass:"hljs-attr"},[s._v("color")]),s._v(": "),a("span",{staticClass:"hljs-string"},[s._v("'#000'")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("opacity")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("1")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("fontSize")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("20")]),s._v("\n }\n})\n")])]),a("h3",[s._v("hasWatermark()")]),a("blockquote",[a("p",[s._v("v0.3.2+")])]),a("p",[s._v("获取是否存在水印。")])])}],_={},r=_,l=t("2877"),i=Object(l["a"])(r,n,v,!1,null,null,null);a["default"]=i.exports}}]);
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0de01b"],{"848a":function(s,a,t){"use strict";t.r(a);var n=function(){var s=this;s._self._c;return s._m(0)},v=[function(){var s=this,a=s._self._c;return a("div",[a("h1",[s._v("Watermark插件")]),a("blockquote",[a("p",[s._v("0.2.24+")])]),a("p",[a("code",[s._v("Watermark")]),s._v("插件负责显示水印。")]),a("p",[s._v("配置请参考"),a("code",[s._v("MindMap")]),s._v("类的"),a("a",{attrs:{href:"/mind-map/#/doc/zh/constructor"}},[s._v("实例化选项")]),s._v("。")]),a("h2",[s._v("注册")]),a("pre",{staticClass:"hljs"},[a("code",[a("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" MindMap "),a("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),a("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map'")]),s._v("\n"),a("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" Watermark "),a("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),a("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/plugins/Watermark.js'")]),s._v("\n"),a("span",{staticClass:"hljs-comment"},[s._v("// import Watermark from 'simple-mind-map/src/Watermark.js' v0.6.0以下版本使用该路径")]),s._v("\n\nMindMap.usePlugin(Watermark)\n")])]),a("p",[s._v("注册完且实例化"),a("code",[s._v("MindMap")]),s._v("后可通过"),a("code",[s._v("mindMap.watermark")]),s._v("获取到该实例。")]),a("h2",[s._v("方法")]),a("h3",[s._v("draw()")]),a("p",[s._v("重新绘制水印。")]),a("p",[s._v("注意:非精确绘制,会绘制一些超出可视区域的水印,如果对性能有极致要求,推荐自行开发水印功能。")]),a("h3",[s._v("updateWatermark(config)")]),a("p",[s._v("更新水印配置。示例:")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.watermark.updateWatermark({\n "),a("span",{staticClass:"hljs-attr"},[s._v("text")]),s._v(": "),a("span",{staticClass:"hljs-string"},[s._v("'水印文字'")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("lineSpacing")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("100")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("textSpacing")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("100")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("angle")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("50")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("textStyle")]),s._v(": {\n "),a("span",{staticClass:"hljs-attr"},[s._v("color")]),s._v(": "),a("span",{staticClass:"hljs-string"},[s._v("'#000'")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("opacity")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("1")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("fontSize")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("20")]),s._v("\n }\n})\n")])]),a("h3",[s._v("hasWatermark()")]),a("blockquote",[a("p",[s._v("v0.3.2+")])]),a("p",[s._v("获取是否存在水印。")]),a("h3",[s._v("clear()")]),a("blockquote",[a("p",[s._v("v0.9.2+")])]),a("p",[s._v("清除水印。")])])}],_={},r=_,l=t("2877"),p=Object(l["a"])(r,n,v,!1,null,null,null);a["default"]=p.exports}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
dist/js/chunk-2d0f0784.js vendored Normal file
View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0f0784"],{"9d03":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this;e._self._c;return e._m(0)},d=[function(){var e=this,t=e._self._c;return t("div",[t("h1",[e._v("TextEdit instance")]),t("p",[e._v("Node text editing instance. It can be obtained through "),t("code",[e._v("mindMap.renderer.textEdit")]),e._v(".")]),t("h2",[e._v("Methods")]),t("h3",[e._v("isShowTextEdit()")]),t("p",[e._v("Get whether the current text editing box is in a display state, that is, whether it is in a text editing state.")]),t("h3",[e._v("hideEditTextBox()")]),t("p",[e._v("Hiding the text editing box will set the content of the current text editing box as node text.")]),t("h3",[e._v("registerTmpShortcut()")]),t("p",[e._v("Register temporary shortcut keys, which means editing can be completed through the Enter and Tab keys.")]),t("h3",[e._v("show({ node})")]),t("ul",[t("li",[t("code",[e._v("node")]),e._v("Node instance to enter for editing")])]),t("p",[e._v("Manually enable node editing. By default, it will enter node editing when double clicking or pressing F2 on the node.")])])}],o={},h=o,r=n("2877"),s=Object(r["a"])(h,i,d,!1,null,null,null);t["default"]=s.exports}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d20ff53"],{b69b:function(s,t,a){"use strict";a.r(t);var n=function(){var s=this;s._self._c;return s._m(0)},e=[function(){var s=this,t=s._self._c;return t("div",[t("h1",[s._v("修改鼠标滚轮的行为")]),t("p",[s._v("鼠标滚轮的行为支持放大缩小画布和上下移动画布,可以在实例化时通过配置指定:")]),t("pre",{staticClass:"hljs"},[t("code",[t("span",{staticClass:"hljs-keyword"},[s._v("new")]),s._v(" MindMap({\n "),t("span",{staticClass:"hljs-comment"},[s._v("// ...")]),s._v("\n "),t("span",{staticClass:"hljs-attr"},[s._v("mousewheelAction")]),s._v(": "),t("span",{staticClass:"hljs-string"},[s._v("'zoom'")]),t("span",{staticClass:"hljs-comment"},[s._v("// zoom放大缩小、move上下移动")]),s._v("\n "),t("span",{staticClass:"hljs-comment"},[s._v("// 当mousewheelAction设为move时可以通过该属性控制鼠标滚动一下视图移动的步长单位px")]),s._v("\n "),t("span",{staticClass:"hljs-attr"},[s._v("mousewheelMoveStep")]),s._v(": "),t("span",{staticClass:"hljs-number"},[s._v("100")]),s._v(",\n})\n")])]),t("p",[s._v("如果需要动态的切换行为可以使用"),t("code",[s._v("updateConfig")]),s._v("方法:")]),t("pre",{staticClass:"hljs"},[t("code",[s._v("mindMap.updateConfig({\n "),t("span",{staticClass:"hljs-attr"},[s._v("mousewheelAction")]),s._v(": "),t("span",{staticClass:"hljs-string"},[s._v("'move'")]),s._v("\n})\n")])]),t("p",[s._v("此外也支持让你自行处理鼠标滚轮事件:")]),t("pre",{staticClass:"hljs"},[t("code",[t("span",{staticClass:"hljs-keyword"},[s._v("new")]),s._v(" MindMap({\n "),t("span",{staticClass:"hljs-comment"},[s._v("// ...")]),s._v("\n "),t("span",{staticClass:"hljs-attr"},[s._v("customHandleMousewheel")]),s._v(": "),t("span",{staticClass:"hljs-function"},[s._v("("),t("span",{staticClass:"hljs-params"},[s._v("e")]),s._v(") =>")]),s._v(" {\n "),t("span",{staticClass:"hljs-comment"},[s._v("// 你的自定义逻辑")]),s._v("\n }\n})\n")])]),t("p",[s._v("当传了"),t("code",[s._v("customHandleMousewheel")]),s._v("选项,"),t("code",[s._v("mousewheelAction")]),s._v("选项将不生效。")]),t("h2",[s._v("完整示例")]),t("iframe",{staticStyle:{width:"100%",height:"455px",border:"none"},attrs:{src:"https://wanglin2.github.io/playground/#eNrFVU+P20QU/ypPRshZlNipxCkkpeXPAYlFqNedFXLsSTJlPGM842SXyBKqkFpKK4FAQiqXLZcWCXFCiO628GU2yfIteOPxON6QAzciOZp57/fe7828P7P0bmdZMC+oN/CGKs5ZpkFRXWQ3iWBpJnMNS8jppAtSHMpCaJp0Qc0izuXiDp1ACZNcpuCjB7+xOGQiOYwyqyKeQjGnvRSlvTTKiEcEABGcajAygxyBKDi38jCE1avvVl89Xv/1xfq3i82TL68e3tvce7F68MPV0+dExFIoDVGs2Zx+JBOq0HobUefo+IAIh4qLPKdC30awFIjDk3T8z6VM/QpkqB7cXz/+6e+XZ+uz++uLJ1evfr16+ujyj3PnQcvplFM8uqKLGaW8cdU5gNFNWJqYr7EE84gXFAF7paMRWH54G/xUzqkPg1piPNX3ERRZEmn6rhQTNu1UHKjbiWGwjwFPpUs8W2mO16Ss0wq2deV04VLlOCgfQCLjIkW3wZTq9zk1y3dOP0g6fm2JUemICZr7B11rhbFGA+vd/IhnBMRriaxY0xNtxMRbn72wSbXFYH5l7cwA4xnjCR7NgI+2Pnbc7WXZZbo8f7Q5f7ZLdp1wD+nxVtfG/U8RuGUtc3ZMMH1HSm264GOpmK2KI5/Tifa74MeYOkzTcQUvD96y/QWAZb/58dvVN7/YoGyfXZ5/fXnxe7sIpej4Al1/YnsNPXbMtgvm/0Om9LaooN2PTQc4nKXHosRvGNopg/MFN5riaMBKxx3AMGFziHmk1Ih4dRDv0VQSr1LXAJZstU0pImQYorYNdJ60lHwcGYhVEj0cF1pjE9+KOYs/rSD7mhwtlsvdEXKtge3wwGmxeXaxevi86uWt7OXP6+//9KEsh6EldNE1kbrVMGxdBG6VPuX2Tm7VI5V4QWjnaN2xAVVpECtFvCatQevOXFoWLNGzAdzo91+vcABZUyg5RUZMWqWoasx8r+3erXO1NYzGSvJCW0MAU24D6Nc7LbPt5t/0M8qmM4S/2e9nJ455P+8bjjmN8ilDXuc1i5KEiakTNKEHdar/Y8Q3XAR10M0eHWKZVjnwup7NgHm5grtKCnwoK/ekVmAGmgFAPHwHbdcHIS6DHMcvS6lJVm+cy4WiOTohXt3Ae95GYzvTOlODMOQnnwl1qgKpVC8WvTFld/HYQcTZaSFiFcQyDbHGqVZ7asPQ1IcpvfIftRG5qQ=="}})])}],l={},v=l,c=a("2877"),i=Object(c["a"])(v,n,e,!1,null,null,null);t["default"]=i.exports}}]);
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d20ff53"],{b69b:function(s,t,a){"use strict";a.r(t);var e=function(){var s=this;s._self._c;return s._m(0)},n=[function(){var s=this,t=s._self._c;return t("div",[t("h1",[s._v("修改鼠标滚轮的行为")]),t("p",[s._v("鼠标滚轮的行为支持放大缩小画布和上下移动画布,可以在实例化时通过配置指定:")]),t("pre",{staticClass:"hljs"},[t("code",[t("span",{staticClass:"hljs-keyword"},[s._v("new")]),s._v(" MindMap({\n "),t("span",{staticClass:"hljs-comment"},[s._v("// ...")]),s._v("\n "),t("span",{staticClass:"hljs-attr"},[s._v("mousewheelAction")]),s._v(": "),t("span",{staticClass:"hljs-string"},[s._v("'move'")]),t("span",{staticClass:"hljs-comment"},[s._v("// zoom放大缩小、move上下移动")]),s._v("\n "),t("span",{staticClass:"hljs-comment"},[s._v("// 当mousewheelAction设为move时可以通过该属性控制鼠标滚动一下视图移动的步长单位px")]),s._v("\n "),t("span",{staticClass:"hljs-attr"},[s._v("mousewheelMoveStep")]),s._v(": "),t("span",{staticClass:"hljs-number"},[s._v("100")]),s._v(",\n "),t("span",{staticClass:"hljs-comment"},[s._v("// 鼠标缩放是否以鼠标当前位置为中心点,否则以画布中心点")]),s._v("\n "),t("span",{staticClass:"hljs-attr"},[s._v("mouseScaleCenterUseMousePosition")]),s._v(": "),t("span",{staticClass:"hljs-literal"},[s._v("true")]),s._v(",\n "),t("span",{staticClass:"hljs-comment"},[s._v("// 当mousewheelAction设为zoom时或者按住Ctrl键时默认向前滚动是缩小向后滚动是放大如果该属性设为true那么会反过来")]),s._v("\n "),t("span",{staticClass:"hljs-attr"},[s._v("mousewheelZoomActionReverse")]),s._v(": "),t("span",{staticClass:"hljs-literal"},[s._v("true")]),s._v(",\n "),t("span",{staticClass:"hljs-comment"},[s._v("// 禁止鼠标滚轮缩放你仍旧可以使用api进行缩放")]),s._v("\n "),t("span",{staticClass:"hljs-attr"},[s._v("disableMouseWheelZoom")]),s._v(": "),t("span",{staticClass:"hljs-literal"},[s._v("false")]),s._v(",\n})\n")])]),t("p",[s._v("如果需要动态的切换行为可以使用"),t("code",[s._v("updateConfig")]),s._v("方法:")]),t("pre",{staticClass:"hljs"},[t("code",[s._v("mindMap.updateConfig({\n "),t("span",{staticClass:"hljs-attr"},[s._v("mousewheelAction")]),s._v(": "),t("span",{staticClass:"hljs-string"},[s._v("'zoom'")]),s._v("\n})\n")])]),t("p",[s._v("此外也支持让你自行处理鼠标滚轮事件:")]),t("pre",{staticClass:"hljs"},[t("code",[t("span",{staticClass:"hljs-keyword"},[s._v("new")]),s._v(" MindMap({\n "),t("span",{staticClass:"hljs-comment"},[s._v("// ...")]),s._v("\n "),t("span",{staticClass:"hljs-attr"},[s._v("customHandleMousewheel")]),s._v(": "),t("span",{staticClass:"hljs-function"},[s._v("("),t("span",{staticClass:"hljs-params"},[s._v("e")]),s._v(") =>")]),s._v(" {\n "),t("span",{staticClass:"hljs-comment"},[s._v("// 你的自定义逻辑")]),s._v("\n }\n})\n")])]),t("p",[s._v("当传了"),t("code",[s._v("customHandleMousewheel")]),s._v("选项,"),t("code",[s._v("mousewheelAction")]),s._v("选项将不生效。")]),t("h2",[s._v("完整示例")]),t("iframe",{staticStyle:{width:"100%",height:"455px",border:"none"},attrs:{src:"https://wanglin2.github.io/playground/#eNrFVU+P20QU/ypPRshZlNipxCkkpeXPAYlFqNedFXLsSTJlPGM842SXyBKqkFpKK4FAQiqXLZcWCXFCiO628GU2yfIteOPxON6QAzciOZp57/fe7828P7P0bmdZMC+oN/CGKs5ZpkFRXWQ3iWBpJnMNS8jppAtSHMpCaJp0Qc0izuXiDp1ACZNcpuCjB7+xOGQiOYwyqyKeQjGnvRSlvTTKiEcEABGcajAygxyBKDi38jCE1avvVl89Xv/1xfq3i82TL68e3tvce7F68MPV0+dExFIoDVGs2Zx+JBOq0HobUefo+IAIh4qLPKdC30awFIjDk3T8z6VM/QpkqB7cXz/+6e+XZ+uz++uLJ1evfr16+ujyj3PnQcvplFM8uqKLGaW8cdU5gNFNWJqYr7EE84gXFAF7paMRWH54G/xUzqkPg1piPNX3ERRZEmn6rhQTNu1UHKjbiWGwjwFPpUs8W2mO16Ss0wq2deV04VLlOCgfQCLjIkW3wZTq9zk1y3dOP0g6fm2JUemICZr7B11rhbFGA+vd/IhnBMRriaxY0xNtxMRbn72wSbXFYH5l7cwA4xnjCR7NgI+2Pnbc7WXZZbo8f7Q5f7ZLdp1wD+nxVtfG/U8RuGUtc3ZMMH1HSm264GOpmK2KI5/Tifa74MeYOkzTcQUvD96y/QWAZb/58dvVN7/YoGyfXZ5/fXnxe7sIpej4Al1/YnsNPXbMtgvm/0Om9LaooN2PTQc4nKXHosRvGNopg/MFN5riaMBKxx3AMGFziHmk1Ih4dRDv0VQSr1LXAJZstU0pImQYorYNdJ60lHwcGYhVEj0cF1pjE9+KOYs/rSD7mhwtlsvdEXKtge3wwGmxeXaxevi86uWt7OXP6+//9KEsh6EldNE1kbrVMGxdBG6VPuX2Tm7VI5V4QWjnaN2xAVVpECtFvCatQevOXFoWLNGzAdzo91+vcABZUyg5RUZMWqWoasx8r+3erXO1NYzGSvJCW0MAU24D6Nc7LbPt5t/0M8qmM4S/2e9nJ455P+8bjjmN8ilDXuc1i5KEiakTNKEHdar/Y8Q3XAR10M0eHWKZVjnwup7NgHm5grtKCnwoK/ekVmAGmgFAPHwHbdcHIS6DHMcvS6lJVm+cy4WiOTohXt3Ae95GYzvTOlODMOQnnwl1qgKpVC8WvTFld/HYQcTZaSFiFcQyDbHGqVZ7asPQ1IcpvfIftRG5qQ=="}})])}],l={},v=l,c=a("2877"),i=Object(c["a"])(v,e,n,!1,null,null,null);t["default"]=i.exports}}]);

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d216037"],{c13f:function(s,t,n){"use strict";n.r(t);var a=function(){var s=this;s._self._c;return s._m(0)},e=[function(){var s=this,t=s._self._c;return t("div",[t("h1",[s._v("开启节点自由拖拽")]),t("p",[s._v("节点支持自由拖拽,也就是可以把它拖动到你指定的位置,默认是不开启的,如果需要开启可以在实例化"),t("code",[s._v("simple-mind-map")]),s._v("时传入开启的选项:")]),t("pre",{staticClass:"hljs"},[t("code",[t("span",{staticClass:"hljs-keyword"},[s._v("new")]),s._v(" MindMap({\n "),t("span",{staticClass:"hljs-comment"},[s._v("// ...")]),s._v("\n "),t("span",{staticClass:"hljs-attr"},[s._v("enableFreeDrag")]),s._v(": "),t("span",{staticClass:"hljs-literal"},[s._v("true")]),s._v("\n})\n")])]),t("p",[s._v("也可以动态切换是否开启:")]),t("pre",{staticClass:"hljs"},[t("code",[s._v("mindMap.updateConfig({\n "),t("span",{staticClass:"hljs-attr"},[s._v("enableFreeDrag")]),s._v(": "),t("span",{staticClass:"hljs-literal"},[s._v("true")]),t("span",{staticClass:"hljs-comment"},[s._v("// false")]),s._v("\n})\n")])]),t("p",[s._v("自由拖拽很容器将节点拖的乱七八糟,所以也可以通过命令回到默认的位置:")]),t("pre",{staticClass:"hljs"},[t("code",[s._v("mindMap.execCommand("),t("span",{staticClass:"hljs-string"},[s._v("'RESET_LAYOUT'")]),s._v(")\n")])]),t("p",[s._v("也可以使用快捷键"),t("code",[s._v("Ctrl + L")]),s._v("来恢复。")]),t("h2",[s._v("完整示例")]),t("iframe",{staticStyle:{width:"100%",height:"455px",border:"none"},attrs:{src:"https://wanglin2.github.io/playground/#eNrFVd1uG0UUfpVhEVoH2buuxJVxSksbJKSEolAuUDeqxrtje8rszLIzm8SyVgoF1EKIFASiFdxAVQFCQFWBEE2oeJmsnb4FZ3b2L44veldLa82c853znZnzM1PrchQ52wmxelZf+jGNFJJEJdFFj9MwErFCUxSTYRsJviESrkjQRnKMGRM7m2SIUjSMRYhs8GBXFhuUBxs4MirPkiBmpBOCtBPiyLM8jpDHGVFIyzRyFfGEMSN3XZQ9/Tr7/GD2397sr+P5d5+efnF7fvtJdvfe6Y+/eNwXXCqEfUW3yTsiIBKs64haN7ZWPF6iqLwWEf5WTMjVGI8ACEdpDTGTJAdpqrt3ZgcPZvcfZYc/Zf/uZYePTu/8Ov/m8Wz/29n+09KPEqMRIw0/rRW0ehFNdcRnOZxtzBICiJeWyTW+OLOTRAFW5IrgQzpq5Z4QIhwPap7eUt8QuEoh/LQ4wezjB9nDg2fH90//eJj980n2eK+MOiaQynU8EYk6G3IZAtkl/hURhpgHLXtz7b216zfXL39w7f3rdum/ynrrvLnOGtkps10dgfVQIPwkJFw5I6LWGNHLNydvA0dhCYdWmHIS2yttYwVXgXvGu/55lhZ4VkNkxIrsKi32rNkPT0xdmHrSv7RwpoH+mLIgJlyDb9Q+FtwtZVlkOjn6cn708yLZWcIlpFu1rol7QRGUy0JW2lFO1aYQSjfSu0JSRQUHS5uRobLbyPYhdZCmrQK+WJ95K2lVuvK66V6EoCTn33+VHf5m4jVdfHK0f3L8d7P2BG/ZHFhvmk4GspbetpH+X6dS1fWGmt1eNViJM/RQr/D1XTPDYHrBRhEYPNBjsEOoH9Bt5DMs5apnFUFcJaHwrFxdAGhQa6sqBUjfBW0TWHpSQrAB1hCj9FR/kCglOLrkM+p/mEOawwOQ0+niYHoD2dlnfz6793tz+NioB+JzM8lGadp3DUlBCjEtkjZ6HxjPz4gFD/X5ylXfbVwfbKWaMHOTl4ox71mOa2Z7MQIcIkPHl9KzqmJwGjddJnOHBmrcQxe63VdyHEJRVXkxAUZIda7Ii1Z/Ly9mpHRVG+KBFCxRxhAhXb891C12SkT15jz9mNDRGOCvdbvRbsm8nPfVkjnE8YgCb+k1wkFAObSEEVShO0WBPGfEF8oIiqCrPTiE4s5zYLUtkwH9mjq3pODweOfuvUIBGagmimfB22zGiOPC0olhntOQ6GR1BrHYkSQGJ55VtPiS91rbjpWKZM912e5HXE6kI6Ts+LwzIPQWHNvBjE4S7kvHF6ELnUGUXFIbmqY4TGql/wPpBfrv"}})])}],l={},r=l,i=n("2877"),p=Object(i["a"])(r,a,e,!1,null,null,null);t["default"]=p.exports}}]);
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d216037"],{c13f:function(s,t,n){"use strict";n.r(t);var a=function(){var s=this;s._self._c;return s._m(0)},e=[function(){var s=this,t=s._self._c;return t("div",[t("h1",[s._v("开启节点自由拖拽")]),t("blockquote",[t("p",[s._v("节点自由拖拽的连线可能不会符合你的预期,这个问题基本上不会改,所以自由拖拽功能不建议使用。")])]),t("p",[s._v("节点支持自由拖拽,也就是可以把它拖动到你指定的位置,默认是不开启的,如果需要开启可以在实例化"),t("code",[s._v("simple-mind-map")]),s._v("时传入开启的选项:")]),t("pre",{staticClass:"hljs"},[t("code",[t("span",{staticClass:"hljs-keyword"},[s._v("new")]),s._v(" MindMap({\n "),t("span",{staticClass:"hljs-comment"},[s._v("// ...")]),s._v("\n "),t("span",{staticClass:"hljs-attr"},[s._v("enableFreeDrag")]),s._v(": "),t("span",{staticClass:"hljs-literal"},[s._v("true")]),s._v("\n})\n")])]),t("p",[s._v("也可以动态切换是否开启:")]),t("pre",{staticClass:"hljs"},[t("code",[s._v("mindMap.updateConfig({\n "),t("span",{staticClass:"hljs-attr"},[s._v("enableFreeDrag")]),s._v(": "),t("span",{staticClass:"hljs-literal"},[s._v("true")]),t("span",{staticClass:"hljs-comment"},[s._v("// false")]),s._v("\n})\n")])]),t("p",[s._v("自由拖拽很容器将节点拖的乱七八糟,所以也可以通过命令回到默认的位置:")]),t("pre",{staticClass:"hljs"},[t("code",[s._v("mindMap.execCommand("),t("span",{staticClass:"hljs-string"},[s._v("'RESET_LAYOUT'")]),s._v(")\n")])]),t("p",[s._v("也可以使用快捷键"),t("code",[s._v("Ctrl + L")]),s._v("来恢复。")]),t("h2",[s._v("完整示例")]),t("iframe",{staticStyle:{width:"100%",height:"455px",border:"none"},attrs:{src:"https://wanglin2.github.io/playground/#eNrFVd1uG0UUfpVhEVoH2buuxJVxSksbJKSEolAuUDeqxrtje8rszLIzm8SyVgoF1EKIFASiFdxAVQFCQFWBEE2oeJmsnb4FZ3b2L44veldLa82c853znZnzM1PrchQ52wmxelZf+jGNFJJEJdFFj9MwErFCUxSTYRsJviESrkjQRnKMGRM7m2SIUjSMRYhs8GBXFhuUBxs4MirPkiBmpBOCtBPiyLM8jpDHGVFIyzRyFfGEMSN3XZQ9/Tr7/GD2397sr+P5d5+efnF7fvtJdvfe6Y+/eNwXXCqEfUW3yTsiIBKs64haN7ZWPF6iqLwWEf5WTMjVGI8ACEdpDTGTJAdpqrt3ZgcPZvcfZYc/Zf/uZYePTu/8Ov/m8Wz/29n+09KPEqMRIw0/rRW0ehFNdcRnOZxtzBICiJeWyTW+OLOTRAFW5IrgQzpq5Z4QIhwPap7eUt8QuEoh/LQ4wezjB9nDg2fH90//eJj980n2eK+MOiaQynU8EYk6G3IZAtkl/hURhpgHLXtz7b216zfXL39w7f3rdum/ynrrvLnOGtkps10dgfVQIPwkJFw5I6LWGNHLNydvA0dhCYdWmHIS2yttYwVXgXvGu/55lhZ4VkNkxIrsKi32rNkPT0xdmHrSv7RwpoH+mLIgJlyDb9Q+FtwtZVlkOjn6cn708yLZWcIlpFu1rol7QRGUy0JW2lFO1aYQSjfSu0JSRQUHS5uRobLbyPYhdZCmrQK+WJ95K2lVuvK66V6EoCTn33+VHf5m4jVdfHK0f3L8d7P2BG/ZHFhvmk4GspbetpH+X6dS1fWGmt1eNViJM/RQr/D1XTPDYHrBRhEYPNBjsEOoH9Bt5DMs5apnFUFcJaHwrFxdAGhQa6sqBUjfBW0TWHpSQrAB1hCj9FR/kCglOLrkM+p/mEOawwOQ0+niYHoD2dlnfz6793tz+NioB+JzM8lGadp3DUlBCjEtkjZ6HxjPz4gFD/X5ylXfbVwfbKWaMHOTl4ox71mOa2Z7MQIcIkPHl9KzqmJwGjddJnOHBmrcQxe63VdyHEJRVXkxAUZIda7Ii1Z/Ly9mpHRVG+KBFCxRxhAhXb891C12SkT15jz9mNDRGOCvdbvRbsm8nPfVkjnE8YgCb+k1wkFAObSEEVShO0WBPGfEF8oIiqCrPTiE4s5zYLUtkwH9mjq3pODweOfuvUIBGagmimfB22zGiOPC0olhntOQ6GR1BrHYkSQGJ55VtPiS91rbjpWKZM912e5HXE6kI6Ts+LwzIPQWHNvBjE4S7kvHF6ELnUGUXFIbmqY4TGql/wPpBfrv"}})])}],l={},r=l,i=n("2877"),p=Object(i["a"])(r,a,e,!1,null,null,null);t["default"]=p.exports}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
dist/js/chunk-2d216f87.js vendored Normal file
View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d216f87"],{c576:function(e,t,n){"use strict";n.r(t);var _=function(){var e=this;e._self._c;return e._m(0)},v=[function(){var e=this,t=e._self._c;return t("div",[t("h1",[e._v("TextEdit 实例")]),t("p",[e._v("节点文本编辑实例。可以通过"),t("code",[e._v("mindMap.renderer.textEdit")]),e._v("获取到。")]),t("h2",[e._v("方法")]),t("h3",[e._v("isShowTextEdit()")]),t("p",[e._v("获取当前文本编辑框是否处于显示状态,也就是是否处在文本编辑状态。")]),t("h3",[e._v("hideEditTextBox()")]),t("p",[e._v("隐藏文本编辑框,会将当前文本编辑框中的内容设置为节点文本。")]),t("h3",[e._v("registerTmpShortcut()")]),t("p",[e._v("注册临时快捷键,也就是可以通过 Enter 键和 Tab 键完成编辑。")]),t("h3",[e._v("show({ node})")]),t("ul",[t("li",[t("code",[e._v("node")]),e._v(":要进入编辑的节点实例")])]),t("p",[e._v("手动开启节点编辑。默认会在节点双击、按 F2 时进入节点编辑。")])])}],i={},r=i,d=n("2877"),o=Object(d["a"])(r,_,v,!1,null,null,null);t["default"]=o.exports}}]);

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d21d064"],{d013:function(s,a,t){"use strict";t.r(a);var n=function(){var s=this;s._self._c;return s._m(0)},_=[function(){var s=this,a=s._self._c;return a("div",[a("h1",[s._v("如何实现搜索替换")]),a("blockquote",[a("p",[s._v("需要先注册 Search 插件")])]),a("p",[s._v("要实现搜索替换很简单,你只要先创建两个输入框,两个按钮,然后调用相关方法即可。")]),a("p",[s._v("第一个输入框用于搜索,可以绑定一个回车事件,然后调用如下方法:")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.search.search("),a("span",{staticClass:"hljs-built_in"},[s._v("this")]),s._v(".searchText, "),a("span",{staticClass:"hljs-function"},[s._v("() =>")]),s._v(" {\n "),a("span",{staticClass:"hljs-built_in"},[s._v("this")]),s._v(".$refs.searchInputRef.focus()\n})\n")])]),a("p",[a("code",[s._v("search")]),s._v("方法调用一次就会跳转到下一个匹配的节点,当搜索文本改变后再调用,默认会重新搜索从头开始。")]),a("p",[a("code",[s._v("search")]),s._v("方法第二个参数是一个回调函数,当本次搜索完成,即在跳转到节点后调用,一般需要在这个回调函数里重新让你的输入框聚焦,因为激活节点会拿走焦点,所以你需要把焦点拿回来。")]),a("p",[s._v("第二个输入框用于替换,替换支持单个替换和全部替换,需要注意的是要先在调用了"),a("code",[s._v("search")]),s._v("方法后才能调用这两个方法,单个替换只需要调用如下方法:")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.search.replace("),a("span",{staticClass:"hljs-built_in"},[s._v("this")]),s._v(".replaceText, "),a("span",{staticClass:"hljs-literal"},[s._v("true")]),s._v(")\n")])]),a("p",[s._v("第二个参数传"),a("code",[s._v("true")]),s._v("会在替换完成后自动跳转到下一个匹配的节点,这样可以进行连续替换。")]),a("p",[s._v("要进行全部替换可以调用如下方法:")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.search.replaceAll("),a("span",{staticClass:"hljs-built_in"},[s._v("this")]),s._v(".replaceText)\n")])]),a("p",[s._v("最后你可以通过监听"),a("code",[s._v("search_info_change")]),s._v("方法来获取匹配的节点数量和当前定位到的索引:")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.on("),a("span",{staticClass:"hljs-string"},[s._v("'search_info_change'")]),s._v(", "),a("span",{staticClass:"hljs-function"},[a("span",{staticClass:"hljs-params"},[s._v("data")]),s._v(" =>")]),s._v(" {\n "),a("span",{staticClass:"hljs-built_in"},[s._v("console")]),s._v(".log("),a("span",{staticClass:"hljs-string"},[s._v("'当前所在:'")]),s._v("+ (data.currentIndex + "),a("span",{staticClass:"hljs-number"},[s._v("1")]),s._v("), "),a("span",{staticClass:"hljs-string"},[s._v("'匹配总数:'")]),s._v(" + data.total)\n})\n")])])])}],c={},l=c,e=t("2877"),i=Object(e["a"])(l,n,_,!1,null,null,null);a["default"]=i.exports}}]);
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d21d064"],{d013:function(s,a,t){"use strict";t.r(a);var n=function(){var s=this;s._self._c;return s._m(0)},_=[function(){var s=this,a=s._self._c;return a("div",[a("h1",[s._v("如何实现搜索替换")]),a("blockquote",[a("p",[s._v("需要先注册 Search 插件")])]),a("p",[s._v("要实现搜索替换很简单,你只要先创建两个输入框,两个按钮,然后调用相关方法即可。")]),a("p",[s._v("第一个输入框用于搜索,可以绑定一个回车事件,然后调用如下方法:")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.search.search("),a("span",{staticClass:"hljs-built_in"},[s._v("this")]),s._v(".searchText, "),a("span",{staticClass:"hljs-function"},[s._v("() =>")]),s._v(" {\n "),a("span",{staticClass:"hljs-built_in"},[s._v("this")]),s._v(".$refs.searchInputRef.focus()\n})\n")])]),a("p",[a("code",[s._v("search")]),s._v("方法调用一次就会跳转到下一个匹配的节点,当搜索文本改变后再调用,默认会重新搜索从头开始。")]),a("p",[a("code",[s._v("search")]),s._v("方法第二个参数是一个回调函数,当本次搜索完成,即在跳转到节点后调用,一般需要在这个回调函数里重新让你的输入框聚焦,因为激活节点会拿走焦点,所以你需要把焦点拿回来。")]),a("p",[s._v("第二个输入框用于替换,替换支持单个替换和全部替换,需要注意的是要先在调用了"),a("code",[s._v("search")]),s._v("方法后才能调用这两个方法,单个替换只需要调用如下方法:")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.search.replace("),a("span",{staticClass:"hljs-built_in"},[s._v("this")]),s._v(".replaceText, "),a("span",{staticClass:"hljs-literal"},[s._v("true")]),s._v(")\n")])]),a("p",[s._v("第二个参数传"),a("code",[s._v("true")]),s._v("会在替换完成后自动跳转到下一个匹配的节点,这样可以进行连续替换。")]),a("p",[s._v("要进行全部替换可以调用如下方法:")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.search.replaceAll("),a("span",{staticClass:"hljs-built_in"},[s._v("this")]),s._v(".replaceText)\n")])]),a("p",[s._v("最后你可以通过监听"),a("code",[s._v("search_info_change")]),s._v("方法来获取匹配的节点数量和当前定位到的索引:")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.on("),a("span",{staticClass:"hljs-string"},[s._v("'search_info_change'")]),s._v(", "),a("span",{staticClass:"hljs-function"},[a("span",{staticClass:"hljs-params"},[s._v("data")]),s._v(" =>")]),s._v(" {\n "),a("span",{staticClass:"hljs-built_in"},[s._v("console")]),s._v(".log("),a("span",{staticClass:"hljs-string"},[s._v("'当前所在:'")]),s._v("+ (data.currentIndex + "),a("span",{staticClass:"hljs-number"},[s._v("1")]),s._v("), "),a("span",{staticClass:"hljs-string"},[s._v("'匹配总数:'")]),s._v(" + data.total)\n})\n")])]),a("p",[s._v("如果是只读模式下搜索,搜索匹配到的节点不会被激活,而是被高亮。")])])}],c={},l=c,e=t("2877"),i=Object(e["a"])(l,n,_,!1,null,null,null);a["default"]=i.exports}}]);

View File

@@ -1 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d21e399"],{d53e:function(s,a,t){"use strict";t.r(a);var _=function(){var s=this;s._self._c;return s._m(0)},v=[function(){var s=this,a=s._self._c;return a("div",[a("h1",[s._v("Formula 插件")]),a("blockquote",[a("p",[s._v("v0.7.2+")])]),a("blockquote",[a("p",[s._v("该插件仅在富文本模式下支持所以需要在注册了RichText插件的前提下使用")])]),a("p",[s._v("该插件用于支持给节点插入公式。")]),a("blockquote",[a("p",[s._v("注意:公式是通过"),a("a",{attrs:{href:"https://github.com/KaTeX/KaTeX"}},[s._v("KaTeX")]),s._v("库实现的,"),a("code",[s._v("KaTeX")]),s._v("提供了一些配置,插件默认的一个配置是:")])]),a("pre",{staticClass:"hljs"},[a("code",[s._v("{\n "),a("span",{staticClass:"hljs-attr"},[s._v("output")]),s._v(": "),a("span",{staticClass:"hljs-string"},[s._v("'mathml'")]),s._v("\n}\n")])]),a("blockquote",[a("p",[s._v("这在少数浏览器上公式可能无法成功渲染,如果你需要兼容这部分浏览器,你可以考虑把该配置改为"),a("code",[s._v("html")]),s._v(",详细文档可以参考:"),a("a",{attrs:{href:"https://katex.org/docs/options"}},[s._v("Options")]),s._v("。使用这个配置可能还需要再引入"),a("code",[s._v("KaTeX")]),s._v("的样式文件,你可以自行测试。")])]),a("h2",[s._v("注册")]),a("pre",{staticClass:"hljs"},[a("code",[a("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" MindMap "),a("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),a("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map'")]),s._v("\n"),a("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" Formula "),a("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),a("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/plugins/Formula.js'")]),s._v("\n\nMindMap.usePlugin(Formula)\n")])]),a("p",[s._v("注册完且实例化"),a("code",[s._v("MindMap")]),s._v("后可通过"),a("code",[s._v("mindMap.formula")]),s._v("获取到该实例。")]),a("h2",[s._v("使用")]),a("p",[s._v("注册了该插件后,可以使用命令"),a("code",[s._v("INSERT_FORMULA")]),s._v("来给节点插入指定公式:")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.execCommand("),a("span",{staticClass:"hljs-string"},[s._v("'INSERT_FORMULA'")]),s._v(", "),a("span",{staticClass:"hljs-string"},[s._v("'a^2'")]),s._v(")\n")])]),a("p",[s._v("上述命令会给当前激活的节点插入"),a("code",[s._v("a^2")]),s._v("公式。")]),a("p",[s._v("如果要指定给某个或某些节点插入公式,可以传递第二个参数:")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.execCommand("),a("span",{staticClass:"hljs-string"},[s._v("'INSERT_FORMULA'")]),s._v(", "),a("span",{staticClass:"hljs-string"},[s._v("'a^2'")]),s._v(", [Node])\n")])]),a("p",[s._v("通过第二个参数传入指定的节点实例即可。")])])}],n={},l=n,e=t("2877"),i=Object(e["a"])(l,_,v,!1,null,null,null);a["default"]=i.exports}}]);
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d21e399"],{d53e:function(s,_,t){"use strict";t.r(_);var a=function(){var s=this;s._self._c;return s._m(0)},v=[function(){var s=this,_=s._self._c;return _("div",[_("h1",[s._v("Formula 插件")]),_("blockquote",[_("p",[s._v("v0.7.2+")])]),_("blockquote",[_("p",[s._v("该插件仅在富文本模式下支持所以需要在注册了RichText插件的前提下使用")])]),_("p",[s._v("该插件用于支持给节点插入公式。")]),_("blockquote",[_("p",[s._v("注意:公式是通过"),_("a",{attrs:{href:"https://github.com/KaTeX/KaTeX"}},[s._v("KaTeX")]),s._v("库实现的,"),_("code",[s._v("KaTeX")]),s._v("提供了一些配置,插件默认的一个配置是:")])]),_("pre",{staticClass:"hljs"},[_("code",[s._v("{\n "),_("span",{staticClass:"hljs-attr"},[s._v("output")]),s._v(": "),_("span",{staticClass:"hljs-string"},[s._v("'mathml'")]),s._v("\n}\n")])]),_("blockquote",[_("p",[s._v("这在少数浏览器上公式可能无法成功渲染,如果你需要兼容这部分浏览器,你可以考虑把该配置改为"),_("code",[s._v("html")]),s._v(",详细文档可以参考:"),_("a",{attrs:{href:"https://katex.org/docs/options"}},[s._v("Options")]),s._v("。使用这个配置可能还需要再引入"),_("code",[s._v("KaTeX")]),s._v("的样式文件,你可以自行测试。")])]),_("blockquote",[_("p",[s._v("v.0.9.3+版本内部会判断当前浏览器的Chrome内核版本是否低于100是的话会自动将"),_("code",[s._v("output")]),s._v("由"),_("code",[s._v("mathml")]),s._v("转为"),_("code",[s._v("html")]),s._v(",此时需要引入"),_("code",[s._v("KaTeX")]),s._v("的样式文件,库内部没有引入,所以需要你手动在项目中引入。如果你是通过"),_("code",[s._v("npm")]),s._v("方式引入"),_("code",[s._v("simple-mind-map")]),s._v(",那么你可以这么引入:")]),_("pre",{staticClass:"hljs"},[_("code",[_("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" "),_("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/node_modules/katex/dist/katex.min.css'")]),s._v("\n")])]),_("p",[s._v("如果你使用的是"),_("code",[s._v(".umd.js")]),s._v("、"),_("code",[s._v(".esm.js")]),s._v("之类的打包后的文件那么可以通过在线的CDN服务来引入比如"),_("code",[s._v("https://unpkg.com/browse/katex@0.16.9/dist/")]),s._v(",当然,最好是把"),_("code",[s._v("katex")]),s._v("的"),_("code",[s._v("css")]),s._v("文件,以及对应的"),_("code",[s._v("fonts")]),s._v("目录下的字体文件上传到你自己的服务器上。")])]),_("h2",[s._v("注册")]),_("pre",{staticClass:"hljs"},[_("code",[_("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" MindMap "),_("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),_("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map'")]),s._v("\n"),_("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" Formula "),_("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),_("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/plugins/Formula.js'")]),s._v("\n\nMindMap.usePlugin(Formula)\n")])]),_("p",[s._v("注册完且实例化"),_("code",[s._v("MindMap")]),s._v("后可通过"),_("code",[s._v("mindMap.formula")]),s._v("获取到该实例。")]),_("h2",[s._v("使用")]),_("p",[s._v("注册了该插件后,可以使用命令"),_("code",[s._v("INSERT_FORMULA")]),s._v("来给节点插入指定公式:")]),_("pre",{staticClass:"hljs"},[_("code",[s._v("mindMap.execCommand("),_("span",{staticClass:"hljs-string"},[s._v("'INSERT_FORMULA'")]),s._v(", "),_("span",{staticClass:"hljs-string"},[s._v("'a^2'")]),s._v(")\n")])]),_("p",[s._v("上述命令会给当前激活的节点插入"),_("code",[s._v("a^2")]),s._v("公式。")]),_("p",[s._v("如果要指定给某个或某些节点插入公式,可以传递第二个参数:")]),_("pre",{staticClass:"hljs"},[_("code",[s._v("mindMap.execCommand("),_("span",{staticClass:"hljs-string"},[s._v("'INSERT_FORMULA'")]),s._v(", "),_("span",{staticClass:"hljs-string"},[s._v("'a^2'")]),s._v(", [Node])\n")])]),_("p",[s._v("通过第二个参数传入指定的节点实例即可。")]),_("h2",[s._v("方法")]),_("h3",[s._v("getKatexConfig()")]),_("p",[s._v("获取当前传递给"),_("code",[s._v("Katex")]),s._v("的配置。")])])}],e={},o=e,n=t("2877"),c=Object(n["a"])(o,a,v,!1,null,null,null);_["default"]=c.exports}}]);

View File

@@ -1 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d221c76"],{cc99:function(s,t,i){"use strict";i.r(t);var n=function(){var s=this;s._self._c;return s._m(0)},a=[function(){var s=this,t=s._self._c;return t("div",[t("h1",[s._v("开启节点富文本编辑")]),t("p",[s._v("默认节点编辑是不支持富文本模式的,如果要开启需要使用富文本编辑插件,但是富文本编辑模式目前存在缺陷,详情可以阅读"),t("a",{attrs:{href:"https://wanglin2.github.io/mind-map/#/doc/zh/richText"}},[s._v("richText")]),s._v("。")]),t("p",[s._v("富文本编辑的优势就是可以对一个节点内的部分文本设置样式所以通常来说还需要搭配一个悬浮的工具栏这个功能默认也是没有的涉及到UI的功能一般都不提供,所以也需要你自行开发,如何渲染这个悬浮工具栏可以阅读"),t("a",{attrs:{href:"https://wanglin2.github.io/mind-map/#/doc/zh/course16"}},[s._v("如何渲染富文本的悬浮工具栏")]),s._v("。")]),t("p",[s._v("如果也你需要动态切换是否开启富文本编辑的功能可以参考如下代码:")]),t("pre",{staticClass:"hljs"},[t("code",[t("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" MindMap "),t("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),t("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map'")]),s._v("\n"),t("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" RichText "),t("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),t("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/plugins/RichText.js'")]),s._v("\n"),t("span",{staticClass:"hljs-comment"},[s._v("// import RichText from 'simple-mind-map/src/RichText.js' v0.6.0以下版本使用该路径")]),s._v("\n\n"),t("span",{staticClass:"hljs-comment"},[s._v("// 动态开启富文本编辑")]),s._v("\nmindMap.addPlugin(RichText)\n\n"),t("span",{staticClass:"hljs-comment"},[s._v("// 动态关闭富文本编辑")]),s._v("\nmindMap.removePlugin(RichText)\n")])]),t("p",[s._v("如果你使用的是"),t("code",[s._v("simpleMindMap.umd.js")]),s._v("或"),t("code",[s._v("simpleMindMap.esm.js")]),s._v("这种打包后的完整版,那么是不支持切换的,默认是就是开启的,如有相关需求可以提"),t("a",{attrs:{href:"https://github.com/wanglin2/mind-map/issues"}},[s._v("issue")]),s._v("。")])])}],c={},e=c,p=i("2877"),l=Object(p["a"])(e,n,a,!1,null,null,null);t["default"]=l.exports}}]);
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d221c76"],{cc99:function(s,n,t){"use strict";t.r(n);var i=function(){var s=this;s._self._c;return s._m(0)},a=[function(){var s=this,n=s._self._c;return n("div",[n("h1",[s._v("开启节点富文本编辑")]),n("p",[s._v("默认节点编辑是不支持富文本模式的,如果要开启需要使用富文本编辑插件。")]),n("p",[s._v("富文本编辑的优势就是可以对一个节点内的部分文本设置样式所以通常来说还需要搭配一个悬浮的工具栏这个功能默认也是没有的涉及到UI的功能都不提供,所以也需要你自行开发,如何渲染这个悬浮工具栏可以阅读"),n("a",{attrs:{href:"https://wanglin2.github.io/mind-map/#/doc/zh/course16"}},[s._v("如何渲染富文本的悬浮工具栏")]),s._v("。")]),n("p",[s._v("如果也你需要动态切换是否开启富文本编辑的功能可以参考如下代码:")]),n("pre",{staticClass:"hljs"},[n("code",[n("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" MindMap "),n("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),n("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map'")]),s._v("\n"),n("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" RichText "),n("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),n("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/plugins/RichText.js'")]),s._v("\n"),n("span",{staticClass:"hljs-comment"},[s._v("// import RichText from 'simple-mind-map/src/RichText.js' v0.6.0以下版本使用该路径")]),s._v("\n\n"),n("span",{staticClass:"hljs-comment"},[s._v("// 动态开启富文本编辑")]),s._v("\nmindMap.addPlugin(RichText)\n\n"),n("span",{staticClass:"hljs-comment"},[s._v("// 动态关闭富文本编辑")]),s._v("\nmindMap.removePlugin(RichText)\n")])]),n("p",[s._v("如果你使用的是"),n("code",[s._v("simpleMindMap.umd.js")]),s._v("或"),n("code",[s._v("simpleMindMap.esm.js")]),s._v("这种打包后的完整版,那么是不支持切换的,默认是就是开启的。")])])}],c={},p=c,l=t("2877"),e=Object(l["a"])(p,i,a,!1,null,null,null);n["default"]=e.exports}}]);

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d229d67"],{dec3:function(s,t,e){"use strict";e.r(t);var a=function(){var s=this;s._self._c;return s._m(0)},n=[function(){var s=this,t=s._self._c;return t("div",[t("h1",[s._v("Formula plugin")]),t("blockquote",[t("p",[s._v("v0.7.2+")])]),t("blockquote",[t("p",[s._v("This plugin is only supported in rich text mode, so it needs to be used after registering the RichText plugin")])]),t("p",[s._v("This plugin is used to support inserting formulas into nodes.")]),t("blockquote",[t("p",[s._v("注意:公式是通过"),t("a",{attrs:{href:"https://github.com/KaTeX/KaTeX"}},[s._v("KaTeX")]),s._v("库实现的,"),t("code",[s._v("KaTeX")]),s._v("提供了一些配置,插件默认的一个配置是:")])]),t("blockquote",[t("p",[s._v("Note: The formula is implemented through the "),t("a",{attrs:{href:"https://github.com/KaTeX/KaTeX"}},[s._v("KaTeX")]),s._v(" library, and 'KaTeX' provides some configurations. The default configuration for the plugin is:")])]),t("pre",{staticClass:"hljs"},[t("code",[s._v("{\n "),t("span",{staticClass:"hljs-attr"},[s._v("output")]),s._v(": "),t("span",{staticClass:"hljs-string"},[s._v("'mathml'")]),s._v("\n}\n")])]),t("blockquote",[t("p",[s._v("This formula may not render successfully on a few browsers. If you need to be compatible with these browsers, you can consider changing the configuration to 'HTML'. For detailed documentation, please refer to "),t("a",{attrs:{href:"https://katex.org/docs/options"}},[s._v("Options")]),s._v(". Using this configuration may require the introduction of a 'KaTeX' style file, which you can test on your own.")])]),t("h2",[s._v("Register")]),t("pre",{staticClass:"hljs"},[t("code",[t("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" MindMap "),t("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),t("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map'")]),s._v("\n"),t("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" Formula "),t("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),t("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/plugins/Formula.js'")]),s._v("\n\nMindMap.usePlugin(Formula)\n")])]),t("p",[s._v("After registration and instantiation of "),t("code",[s._v("MindMap")]),s._v(", the instance can be obtained through "),t("code",[s._v("mindMap.formula")]),s._v(".")]),t("h2",[s._v("Usage")]),t("p",[s._v("After registering the plugin, you can use the command 'INSERT_FORMULA' to insert the specified formula for the node:")]),t("pre",{staticClass:"hljs"},[t("code",[s._v("mindMap.execCommand("),t("span",{staticClass:"hljs-string"},[s._v("'INSERT_FORMULA'")]),s._v(", "),t("span",{staticClass:"hljs-string"},[s._v("'a^2'")]),s._v(")\n")])]),t("p",[s._v("The above command will insert the 'a^2' formula into the currently active node.")]),t("p",[s._v("If you want to assign a formula to a node or nodes, you can pass the second parameter:")]),t("pre",{staticClass:"hljs"},[t("code",[s._v("mindMap.execCommand("),t("span",{staticClass:"hljs-string"},[s._v("'INSERT_FORMULA'")]),s._v(", "),t("span",{staticClass:"hljs-string"},[s._v("'a^2'")]),s._v(", [Node])\n")])]),t("p",[s._v("Pass in the specified node instance through the second parameter.")])])}],o={},i=o,r=e("2877"),l=Object(r["a"])(i,a,n,!1,null,null,null);t["default"]=l.exports}}]);
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d229d67"],{dec3:function(t,e,s){"use strict";s.r(e);var o=function(){var t=this;t._self._c;return t._m(0)},a=[function(){var t=this,e=t._self._c;return e("div",[e("h1",[t._v("Formula plugin")]),e("blockquote",[e("p",[t._v("v0.7.2+")])]),e("blockquote",[e("p",[t._v("This plugin is only supported in rich text mode, so it needs to be used after registering the RichText plugin")])]),e("p",[t._v("This plugin is used to support inserting formulas into nodes.")]),e("blockquote",[e("p",[t._v("注意:公式是通过"),e("a",{attrs:{href:"https://github.com/KaTeX/KaTeX"}},[t._v("KaTeX")]),t._v("库实现的,"),e("code",[t._v("KaTeX")]),t._v("提供了一些配置,插件默认的一个配置是:")])]),e("blockquote",[e("p",[t._v("Note: The formula is implemented through the "),e("a",{attrs:{href:"https://github.com/KaTeX/KaTeX"}},[t._v("KaTeX")]),t._v(" library, and 'KaTeX' provides some configurations. The default configuration for the plugin is:")])]),e("pre",{staticClass:"hljs"},[e("code",[t._v("{\n "),e("span",{staticClass:"hljs-attr"},[t._v("output")]),t._v(": "),e("span",{staticClass:"hljs-string"},[t._v("'mathml'")]),t._v("\n}\n")])]),e("blockquote",[e("p",[t._v("This formula may not render successfully on a few browsers. If you need to be compatible with these browsers, you can consider changing the configuration to 'HTML'. For detailed documentation, please refer to "),e("a",{attrs:{href:"https://katex.org/docs/options"}},[t._v("Options")]),t._v(". Using this configuration may require the introduction of a 'KaTeX' style file, which you can test on your own.")])]),e("blockquote",[e("p",[t._v("v0.9.3+will internally determine whether the current Chrome kernel version of the browser is lower than 100, If so, it will automatically convert 'output' from 'mathml' to 'html', At this point, the style file for 'KaTeX' needs to be imported, but it is not imported within the library, so you need to manually import it in the project. If you introduced 'simple-mind-map' through the 'npm' method, you can introduce it as follows:")]),e("pre",{staticClass:"hljs"},[e("code",[e("span",{staticClass:"hljs-keyword"},[t._v("import")]),t._v(" "),e("span",{staticClass:"hljs-string"},[t._v("'simple-mind-map/node_modules/katex/dist/katex.min.css'")]),t._v("\n")])]),e("p",[t._v("If you are using packaged files such as '.umd.js' or '.esm.js', you can import them through online CDN services, such as "),e("code",[t._v("https://unpkg.com/browse/katex@0.16.9/dist/")]),t._v(", Of course, it is best to upload the 'css' file of the 'katex' and the corresponding font files in the 'fonts' directory to your own server.")])]),e("h2",[t._v("Register")]),e("pre",{staticClass:"hljs"},[e("code",[e("span",{staticClass:"hljs-keyword"},[t._v("import")]),t._v(" MindMap "),e("span",{staticClass:"hljs-keyword"},[t._v("from")]),t._v(" "),e("span",{staticClass:"hljs-string"},[t._v("'simple-mind-map'")]),t._v("\n"),e("span",{staticClass:"hljs-keyword"},[t._v("import")]),t._v(" Formula "),e("span",{staticClass:"hljs-keyword"},[t._v("from")]),t._v(" "),e("span",{staticClass:"hljs-string"},[t._v("'simple-mind-map/src/plugins/Formula.js'")]),t._v("\n\nMindMap.usePlugin(Formula)\n")])]),e("p",[t._v("After registration and instantiation of "),e("code",[t._v("MindMap")]),t._v(", the instance can be obtained through "),e("code",[t._v("mindMap.formula")]),t._v(".")]),e("h2",[t._v("Usage")]),e("p",[t._v("After registering the plugin, you can use the command 'INSERT_FORMULA' to insert the specified formula for the node:")]),e("pre",{staticClass:"hljs"},[e("code",[t._v("mindMap.execCommand("),e("span",{staticClass:"hljs-string"},[t._v("'INSERT_FORMULA'")]),t._v(", "),e("span",{staticClass:"hljs-string"},[t._v("'a^2'")]),t._v(")\n")])]),e("p",[t._v("The above command will insert the 'a^2' formula into the currently active node.")]),e("p",[t._v("If you want to assign a formula to a node or nodes, you can pass the second parameter:")]),e("pre",{staticClass:"hljs"},[e("code",[t._v("mindMap.execCommand("),e("span",{staticClass:"hljs-string"},[t._v("'INSERT_FORMULA'")]),t._v(", "),e("span",{staticClass:"hljs-string"},[t._v("'a^2'")]),t._v(", [Node])\n")])]),e("p",[t._v("Pass in the specified node instance through the second parameter.")]),e("h2",[t._v("Methods")]),e("h3",[t._v("getKatexConfig()")]),e("p",[t._v("Get the current configuration passed to "),e("code",[t._v("Katex")]),t._v(".")])])}],n={},i=n,r=s("2877"),l=Object(r["a"])(i,o,a,!1,null,null,null);e["default"]=l.exports}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More