mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-26 12:08:41 +08:00
Compare commits
78 Commits
0.9.1-fix.
...
0.9.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3593990f9b | ||
|
|
eec99c1c43 | ||
|
|
06a777eb64 | ||
|
|
e3cb7b0a6b | ||
|
|
163ae6caae | ||
|
|
78d677a00c | ||
|
|
3a1615f041 | ||
|
|
166f2e0a73 | ||
|
|
c62089adb9 | ||
|
|
130acff77c | ||
|
|
c4713097a0 | ||
|
|
c50f278ec1 | ||
|
|
9af630e578 | ||
|
|
541606b2eb | ||
|
|
0784eab6d1 | ||
|
|
1ad1538699 | ||
|
|
a488b436ee | ||
|
|
3a6a2544b2 | ||
|
|
1bb7e431fb | ||
|
|
0cfa21d4e6 | ||
|
|
1409b07fb3 | ||
|
|
c0fb1e8db8 | ||
|
|
eb50b70214 | ||
|
|
794d3e9a53 | ||
|
|
f087b7102e | ||
|
|
ee97731e18 | ||
|
|
7196c37e9a | ||
|
|
2a85a03889 | ||
|
|
8b99a6c191 | ||
|
|
6d378ca2e5 | ||
|
|
5739fae4f7 | ||
|
|
06ad8cfbf6 | ||
|
|
aed8e24afc | ||
|
|
b7cb52b703 | ||
|
|
d4fc37fc98 | ||
|
|
7b4bd6b0bb | ||
|
|
80f8a357fe | ||
|
|
a66cced73c | ||
|
|
29c5075fa5 | ||
|
|
5bea2606f6 | ||
|
|
9db988e3ec | ||
|
|
bac174c8df | ||
|
|
c0db185ca6 | ||
|
|
642f486841 | ||
|
|
69a97d44bc | ||
|
|
d19fd7e186 | ||
|
|
2bcf763ea2 | ||
|
|
9ea36a852f | ||
|
|
4d2665c98b | ||
|
|
33a2e20ee2 | ||
|
|
7b8946bec4 | ||
|
|
88f2e60720 | ||
|
|
b4e0ad6881 | ||
|
|
d80ee1e7c8 | ||
|
|
3d0b257325 | ||
|
|
4d9aa1d3c2 | ||
|
|
abc30da43b | ||
|
|
f887b14d1f | ||
|
|
346e5b4ac8 | ||
|
|
6f7bb40c49 | ||
|
|
f3694d0c00 | ||
|
|
f2fbde3763 | ||
|
|
b950c2bfe9 | ||
|
|
69a7deedd7 | ||
|
|
63b04e5acc | ||
|
|
4a2816fc75 | ||
|
|
42ffbd728c | ||
|
|
0ec16bd136 | ||
|
|
d517ee338f | ||
|
|
cad6f1dce7 | ||
|
|
8dc637c544 | ||
|
|
fc45e2a528 | ||
|
|
2863c0404a | ||
|
|
52600f6fdf | ||
|
|
5393e49a7a | ||
|
|
de6bd0c3ef | ||
|
|
766457b1a5 | ||
|
|
1c8906157f |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
node_modules
|
||||
.DS_Store
|
||||
dist_electron
|
||||
simple-mind-map/dist
|
||||
simple-mind-map/dist
|
||||
simple-mind-map/types
|
||||
40
README.md
40
README.md
@@ -7,7 +7,7 @@
|
||||
[](https://github.com/wanglin2/mind-map/network/members)
|
||||

|
||||
|
||||
> 一个简单&强大的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: [],
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
@@ -230,4 +232,24 @@ const mindMap = new MindMap({
|
||||
<img src="./web/src/assets/avatar/张扬.png" style="width: 50px;height: 50px;" />
|
||||
<span>张扬</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/HaHN.jpg" style="width: 50px;height: 50px;" />
|
||||
<span>HaHN</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/欣.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
BIN
dist/fonts/KaTeX_AMS-Regular.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_AMS-Regular.woff
vendored
Normal file
BIN
dist/fonts/KaTeX_AMS-Regular.woff
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_AMS-Regular.woff2
vendored
Normal file
BIN
dist/fonts/KaTeX_AMS-Regular.woff2
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Caligraphic-Bold.ttf
vendored
Normal file
BIN
dist/fonts/KaTeX_Caligraphic-Bold.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Caligraphic-Bold.woff
vendored
Normal file
BIN
dist/fonts/KaTeX_Caligraphic-Bold.woff
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Caligraphic-Bold.woff2
vendored
Normal file
BIN
dist/fonts/KaTeX_Caligraphic-Bold.woff2
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Caligraphic-Regular.ttf
vendored
Normal file
BIN
dist/fonts/KaTeX_Caligraphic-Regular.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Caligraphic-Regular.woff
vendored
Normal file
BIN
dist/fonts/KaTeX_Caligraphic-Regular.woff
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Caligraphic-Regular.woff2
vendored
Normal file
BIN
dist/fonts/KaTeX_Caligraphic-Regular.woff2
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Fraktur-Bold.ttf
vendored
Normal file
BIN
dist/fonts/KaTeX_Fraktur-Bold.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Fraktur-Bold.woff
vendored
Normal file
BIN
dist/fonts/KaTeX_Fraktur-Bold.woff
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Fraktur-Bold.woff2
vendored
Normal file
BIN
dist/fonts/KaTeX_Fraktur-Bold.woff2
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Fraktur-Regular.ttf
vendored
Normal file
BIN
dist/fonts/KaTeX_Fraktur-Regular.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Fraktur-Regular.woff
vendored
Normal file
BIN
dist/fonts/KaTeX_Fraktur-Regular.woff
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Fraktur-Regular.woff2
vendored
Normal file
BIN
dist/fonts/KaTeX_Fraktur-Regular.woff2
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Main-Bold.ttf
vendored
Normal file
BIN
dist/fonts/KaTeX_Main-Bold.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Main-Bold.woff
vendored
Normal file
BIN
dist/fonts/KaTeX_Main-Bold.woff
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Main-Bold.woff2
vendored
Normal file
BIN
dist/fonts/KaTeX_Main-Bold.woff2
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Main-BoldItalic.ttf
vendored
Normal file
BIN
dist/fonts/KaTeX_Main-BoldItalic.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Main-BoldItalic.woff
vendored
Normal file
BIN
dist/fonts/KaTeX_Main-BoldItalic.woff
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Main-BoldItalic.woff2
vendored
Normal file
BIN
dist/fonts/KaTeX_Main-BoldItalic.woff2
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Main-Italic.ttf
vendored
Normal file
BIN
dist/fonts/KaTeX_Main-Italic.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Main-Italic.woff
vendored
Normal file
BIN
dist/fonts/KaTeX_Main-Italic.woff
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Main-Italic.woff2
vendored
Normal file
BIN
dist/fonts/KaTeX_Main-Italic.woff2
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Main-Regular.ttf
vendored
Normal file
BIN
dist/fonts/KaTeX_Main-Regular.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Main-Regular.woff
vendored
Normal file
BIN
dist/fonts/KaTeX_Main-Regular.woff
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Main-Regular.woff2
vendored
Normal file
BIN
dist/fonts/KaTeX_Main-Regular.woff2
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Math-BoldItalic.ttf
vendored
Normal file
BIN
dist/fonts/KaTeX_Math-BoldItalic.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Math-BoldItalic.woff
vendored
Normal file
BIN
dist/fonts/KaTeX_Math-BoldItalic.woff
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Math-BoldItalic.woff2
vendored
Normal file
BIN
dist/fonts/KaTeX_Math-BoldItalic.woff2
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Math-Italic.ttf
vendored
Normal file
BIN
dist/fonts/KaTeX_Math-Italic.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Math-Italic.woff
vendored
Normal file
BIN
dist/fonts/KaTeX_Math-Italic.woff
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Math-Italic.woff2
vendored
Normal file
BIN
dist/fonts/KaTeX_Math-Italic.woff2
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_SansSerif-Bold.ttf
vendored
Normal file
BIN
dist/fonts/KaTeX_SansSerif-Bold.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_SansSerif-Bold.woff
vendored
Normal file
BIN
dist/fonts/KaTeX_SansSerif-Bold.woff
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_SansSerif-Bold.woff2
vendored
Normal file
BIN
dist/fonts/KaTeX_SansSerif-Bold.woff2
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_SansSerif-Italic.ttf
vendored
Normal file
BIN
dist/fonts/KaTeX_SansSerif-Italic.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_SansSerif-Italic.woff
vendored
Normal file
BIN
dist/fonts/KaTeX_SansSerif-Italic.woff
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_SansSerif-Italic.woff2
vendored
Normal file
BIN
dist/fonts/KaTeX_SansSerif-Italic.woff2
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_SansSerif-Regular.ttf
vendored
Normal file
BIN
dist/fonts/KaTeX_SansSerif-Regular.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_SansSerif-Regular.woff
vendored
Normal file
BIN
dist/fonts/KaTeX_SansSerif-Regular.woff
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_SansSerif-Regular.woff2
vendored
Normal file
BIN
dist/fonts/KaTeX_SansSerif-Regular.woff2
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Script-Regular.ttf
vendored
Normal file
BIN
dist/fonts/KaTeX_Script-Regular.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Script-Regular.woff
vendored
Normal file
BIN
dist/fonts/KaTeX_Script-Regular.woff
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Script-Regular.woff2
vendored
Normal file
BIN
dist/fonts/KaTeX_Script-Regular.woff2
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Size1-Regular.ttf
vendored
Normal file
BIN
dist/fonts/KaTeX_Size1-Regular.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Size1-Regular.woff
vendored
Normal file
BIN
dist/fonts/KaTeX_Size1-Regular.woff
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Size1-Regular.woff2
vendored
Normal file
BIN
dist/fonts/KaTeX_Size1-Regular.woff2
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Size2-Regular.ttf
vendored
Normal file
BIN
dist/fonts/KaTeX_Size2-Regular.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Size2-Regular.woff
vendored
Normal file
BIN
dist/fonts/KaTeX_Size2-Regular.woff
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Size2-Regular.woff2
vendored
Normal file
BIN
dist/fonts/KaTeX_Size2-Regular.woff2
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Size3-Regular.ttf
vendored
Normal file
BIN
dist/fonts/KaTeX_Size3-Regular.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Size3-Regular.woff
vendored
Normal file
BIN
dist/fonts/KaTeX_Size3-Regular.woff
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Size4-Regular.ttf
vendored
Normal file
BIN
dist/fonts/KaTeX_Size4-Regular.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Size4-Regular.woff
vendored
Normal file
BIN
dist/fonts/KaTeX_Size4-Regular.woff
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Size4-Regular.woff2
vendored
Normal file
BIN
dist/fonts/KaTeX_Size4-Regular.woff2
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Typewriter-Regular.ttf
vendored
Normal file
BIN
dist/fonts/KaTeX_Typewriter-Regular.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Typewriter-Regular.woff
vendored
Normal file
BIN
dist/fonts/KaTeX_Typewriter-Regular.woff
vendored
Normal file
Binary file not shown.
BIN
dist/fonts/KaTeX_Typewriter-Regular.woff2
vendored
Normal file
BIN
dist/fonts/KaTeX_Typewriter-Regular.woff2
vendored
Normal file
Binary file not shown.
BIN
dist/img/HaHN.jpg
vendored
Normal file
BIN
dist/img/HaHN.jpg
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
1
dist/img/图片加载失败.svg
vendored
Normal file
1
dist/img/图片加载失败.svg
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1702344017086" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1621" width="128" height="128" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M776 328m-72 0a72 72 0 1 0 144 0 72 72 0 1 0-144 0Z" p-id="1622" fill="#bfbfbf"></path><path d="M999.904 116.608a32 32 0 0 0-21.952-10.912l-456.192-31.904a31.552 31.552 0 0 0-27.2 11.904l-92.192 114.848a32 32 0 0 0 0.672 40.896l146.144 169.952-147.456 194.656 36.48-173.376a32 32 0 0 0-11.136-31.424L235.616 245.504l79.616-125.696a32 32 0 0 0-29.28-49.024l-240.192 16.768a32 32 0 0 0-29.696 34.176l55.808 798.016a32.064 32.064 0 0 0 34.304 29.696l176.512-13.184c17.632-1.312 30.848-16.672 29.504-34.272s-16.576-31.04-34.304-29.536l-144.448 10.784-6.432-92.512 125.312-12.576a32 32 0 0 0 28.672-35.04 32.16 32.16 0 0 0-35.04-28.672l-123.392 12.416L82.144 149.184l145.152-10.144-60.96 96.224a32 32 0 0 0 6.848 41.952l198.4 161.344-58.752 279.296a30.912 30.912 0 0 0 0.736 14.752 31.68 31.68 0 0 0 1.408 11.04l51.52 154.56a31.968 31.968 0 0 0 27.456 21.76l523.104 47.552a32.064 32.064 0 0 0 34.848-29.632L1007.68 139.84a32.064 32.064 0 0 0-7.776-23.232z m-98.912 630.848l-412.576-39.648a31.52 31.52 0 0 0-34.912 28.768 32 32 0 0 0 28.8 34.912l414.24 39.808-6.272 89.536-469.728-42.72-39.584-118.72 234.816-310.016a31.936 31.936 0 0 0-1.248-40.192L468.896 219.84l65.088-81.056 407.584 28.48-40.576 580.192z" p-id="1623" fill="#bfbfbf"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
BIN
dist/img/欣.jpg
vendored
Normal file
BIN
dist/img/欣.jpg
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 39 KiB |
BIN
dist/img/继龙.jpg
vendored
Normal file
BIN
dist/img/继龙.jpg
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 39 KiB |
BIN
dist/img/长沙利奥软件.jpg
vendored
Normal file
BIN
dist/img/长沙利奥软件.jpg
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
2
dist/js/app.js
vendored
2
dist/js/app.js
vendored
File diff suppressed because one or more lines are too long
1
dist/js/chunk-0c8a7f52.js
vendored
1
dist/js/chunk-0c8a7f52.js
vendored
File diff suppressed because one or more lines are too long
83
dist/js/chunk-1066cf58.js
vendored
Normal file
83
dist/js/chunk-1066cf58.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/js/chunk-2d0aa978.js
vendored
2
dist/js/chunk-2d0aa978.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/chunk-2d0ab10b.js
vendored
2
dist/js/chunk-2d0ab10b.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/chunk-2d0abe0f.js
vendored
2
dist/js/chunk-2d0abe0f.js
vendored
@@ -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}}]);
|
||||
2
dist/js/chunk-2d0afe0d.js
vendored
2
dist/js/chunk-2d0afe0d.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/chunk-2d0b361e.js
vendored
2
dist/js/chunk-2d0b361e.js
vendored
@@ -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}}]);
|
||||
2
dist/js/chunk-2d0b9b64.js
vendored
2
dist/js/chunk-2d0b9b64.js
vendored
@@ -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(鱼骨图)、verticalTimeline(v0.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(鱼骨图)、verticalTimeline(v0.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}}]);
|
||||
2
dist/js/chunk-2d0c09f6.js
vendored
2
dist/js/chunk-2d0c09f6.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/chunk-2d0c0a44.js
vendored
2
dist/js/chunk-2d0c0a44.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/chunk-2d0c191e.js
vendored
2
dist/js/chunk-2d0c191e.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/chunk-2d0d9fbc.js
vendored
2
dist/js/chunk-2d0d9fbc.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/chunk-2d0da701.js
vendored
2
dist/js/chunk-2d0da701.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/chunk-2d0dad5f.js
vendored
2
dist/js/chunk-2d0dad5f.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/chunk-2d0dddce.js
vendored
2
dist/js/chunk-2d0dddce.js
vendored
@@ -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}}]);
|
||||
2
dist/js/chunk-2d0de01b.js
vendored
2
dist/js/chunk-2d0de01b.js
vendored
@@ -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}}]);
|
||||
2
dist/js/chunk-2d0e2326.js
vendored
2
dist/js/chunk-2d0e2326.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/chunk-2d0e9742.js
vendored
2
dist/js/chunk-2d0e9742.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/chunk-2d0f026c.js
vendored
2
dist/js/chunk-2d0f026c.js
vendored
File diff suppressed because one or more lines are too long
1
dist/js/chunk-2d0f0784.js
vendored
Normal file
1
dist/js/chunk-2d0f0784.js
vendored
Normal 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}}]);
|
||||
2
dist/js/chunk-2d208ffa.js
vendored
2
dist/js/chunk-2d208ffa.js
vendored
File diff suppressed because one or more lines are too long
3
dist/js/chunk-2d20ec02.js
vendored
3
dist/js/chunk-2d20ec02.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/chunk-2d20f68f.js
vendored
2
dist/js/chunk-2d20f68f.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/chunk-2d20ff53.js
vendored
2
dist/js/chunk-2d20ff53.js
vendored
@@ -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}}]);
|
||||
2
dist/js/chunk-2d216004.js
vendored
2
dist/js/chunk-2d216004.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/chunk-2d216037.js
vendored
2
dist/js/chunk-2d216037.js
vendored
@@ -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}}]);
|
||||
2
dist/js/chunk-2d216642.js
vendored
2
dist/js/chunk-2d216642.js
vendored
File diff suppressed because one or more lines are too long
21
dist/js/chunk-2d216b67.js
vendored
21
dist/js/chunk-2d216b67.js
vendored
File diff suppressed because one or more lines are too long
1
dist/js/chunk-2d216f87.js
vendored
Normal file
1
dist/js/chunk-2d216f87.js
vendored
Normal 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}}]);
|
||||
2
dist/js/chunk-2d217907.js
vendored
2
dist/js/chunk-2d217907.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/chunk-2d21d064.js
vendored
2
dist/js/chunk-2d21d064.js
vendored
@@ -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}}]);
|
||||
2
dist/js/chunk-2d21e399.js
vendored
2
dist/js/chunk-2d21e399.js
vendored
@@ -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}}]);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user