commit message

tools
PJ568 2 years ago
commit f0df0a5426

@ -0,0 +1,19 @@
# <img height="30" style="margin: -3px 5px;" src="https://Tools.PJ568.eu.org/img/icon.svg" />Tools
> 简体中文 | [English](./README_EN.md)
此分支存储所有的在线工具。
## 📖其他说明
[见主 README 文件](https://github.com/PJ-568/568tools#%E5%BE%85%E5%AE%8C%E6%88%90)
## 🏆贡献者们
> 感谢所有让这个项目变得更好的贡献者们!
[![Contributors Chart](https://contrib.rocks/image?repo=PJ-568/568tools)](https://github.com/PJ-568/568tools/graphs/contributors)
## ⭐Star 历史
![Star History Chart](https://api.star-history.com/svg?repos=PJ-568/568tools&type=Date)

@ -0,0 +1,19 @@
# <img height="30" style="margin: -3px 5px;" src="https://Tools.PJ568.eu.org/img/icon.svg" />568Tools Online Toolbox
> [简体中文](./README.md) | English
This branch stores all online tools.
## 📖Infomation
[See in Main README](https://github.com/PJ-568/568tools/blob/main/README_EN.md#to-do-list)
## 🏆Contributors
> Thanks to all the contributors who made this project better!
[![Contributors Chart](https://contrib.rocks/image?repo=PJ-568/568tools)](https://github.com/PJ-568/568tools/graphs/contributors)
## ⭐Star History
![Star History Chart](https://api.star-history.com/svg?repos=PJ-568/568tools&type=Date)

@ -0,0 +1,42 @@
[
{
"name":"PJ568的博客",
"url":"https://PJ568.eu.org/",
"type":"568服务"
},
{
"name":"568Tools&nbsp;在线工具箱",
"url":"https://Tools.PJ568.eu.org/",
"type":"568服务"
},
{
"name":"转转雀&nbsp;-&nbsp;Github&nbsp;文件加速",
"url":"https://proxy.PJ568.eu.org/",
"type":"568服务"
},
{
"name":"Chat.pj568.eu.org",
"url":"https://Chat.pj568.eu.org/",
"type":"568服务"
},
{
"name":"黑色全屏",
"url":"/568tools/tools/黑色全屏/",
"type":"屏幕工具"
},
{
"name":"字符生成图片",
"url":"/568tools/tools/geopattern/",
"type":"图像处理"
},
{
"name":"思维导图",
"url":"/incert/?link=568tools/tools/mind-map/",
"type":"图像处理"
},
{
"name":"32&nbsp;位&nbsp;x86&nbsp;虚拟机",
"url":"/568tools/tools/v86/",
"type":"软件模拟"
}
]

@ -0,0 +1,57 @@
var classify = [{
"id": 1,
"name": "568服务",
"list": [{
"name": "PJ568的博客",
"url": "https://PJ568.eu.org/",
"hot": 0,
"img": ""
}, {
"name": "568Tools&nbsp;在线工具箱",
"url": "https://Tools.PJ568.eu.org/",
"hot": 1,
"img": ""
}, {
"name": "转转雀&nbsp;-&nbsp;Github&nbsp;文件加速",
"url": "https://Proxy.PJ568.eu.org/",
"hot": 1,
"img": ""
}, {
"name": "Chat.pj568.eu.org",
"url": "https://Chat.PJ568.eu.org/",
"hot": 0,
"img": ""
}]
}, {
"id": 2,
"name": "图像处理",
"list": [{
"name": "字符生成图片",
"url": "/568tools/tools/geopattern/",
"hot": 0,
"img": ""
}, {
"name": "思维导图",
"url": "/incert/?link=568tools/tools/mind-map/",
"hot": 1,
"img": ""
}]
}, {
"id": 3,
"name": "软件模拟",
"list": [{
"name": "32&nbsp;位&nbsp;x86&nbsp;虚拟机",
"url": "/568tools/tools/v86/",
"hot": 0,
"img": ""
}]
}, {
"id": 4,
"name": "屏幕工具",
"list": [{
"name": "黑色全屏",
"url": "/568tools/tools/黑色全屏/",
"hot": 0,
"img": ""
}]
}]

@ -0,0 +1,22 @@
Copyright (c) 2014 Jason Long, Brandon Mills
MIT License
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

@ -0,0 +1,51 @@
body, html {
margin: 0;
padding: 0;
width: 100%;
height: calc(100%-42px);
font-family: sans-serif;
background: #7f7f7f;
}
.js-geopattern,
#string {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
input {
text-align: center;
color: #f7f7f7;
background: rgba(0, 0, 0, 0);
border: 0;
outline: 0;
text-shadow: 0 0 5px rgba(255, 255, 255, 0.75);
font-size: 30pt;
}
input::-ms-clear {
display: none;
}
#save {
position: absolute;
bottom: 0;
width: 100%;
text-align: center;
text-decoration: none;
color: white;
font-size: 18px;
line-height: 36px;
font-weight: 200;
background: rgba(255, 255, 255, 0.1);
}
#save:hover {
background: rgba(255, 255, 255, 0.75);
color: black;
}

@ -0,0 +1,38 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>GeoPattern - 字符生成图片</title>
<link rel="icon" type="image/svg+xml" href="./img/icon.svg">
<link href="css/demo.css" rel="stylesheet"/>
<script src="https://Tools.PJ568.eu.org/js/include.js"></script>
</head>
<style>
@import url(https://Tools.PJ568.eu.org/css/tool_type.css);
</style>
<body>
<div id="bg-0" class="js-geopattern"></div>
<div id="bg-1" class="js-geopattern"></div>
<input type="text" id="string" value=" start typing... " autocomplete="off" />
<a id="save" href="#">保存图案</a>
<!--[if IE 9]>
<script src="js/base64.min.js"></script>
<script src="js/typedarray.js"></script>
<![endif]-->
<script src="js/jquery.min.js"></script>
<script src="js/geopattern.min.js"></script>
<script src="js/demo.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-57810596-1', 'auto');
ga('send', 'pageview');
</script>
<include src="https://tools.pj568.eu.org/header.html"></include>
</body>
</html>

@ -0,0 +1 @@
!function(){function t(t){this.message=t}var r="undefined"!=typeof exports?exports:this,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.prototype=new Error,t.prototype.name="InvalidCharacterError",r.btoa||(r.btoa=function(r){for(var o,n,a=String(r),i=0,c=e,d="";a.charAt(0|i)||(c="=",i%1);d+=c.charAt(63&o>>8-i%1*8)){if(n=a.charCodeAt(i+=.75),n>255)throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");o=o<<8|n}return d}),r.atob||(r.atob=function(r){var o=String(r).replace(/=+$/,"");if(o.length%4==1)throw new t("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,a,i=0,c=0,d="";a=o.charAt(c++);~a&&(n=i%4?64*n+a:a,i++%4)?d+=String.fromCharCode(255&n>>(-2*i&6)):0)a=e.indexOf(a);return d})}();

@ -0,0 +1,84 @@
var next = (function () {
var which = 0;
return function () {
return {
prev: which,
next: which = (which + 1) % 2
};
};
}());
// Hook and debounce input event
function onChange($el, cb) {
var last = $el.val();
$el.on('input', function () {
var val = $el.val();
var oldVal;
if (last !== val) {
oldVal = last;
last = val;
typeof cb === 'function' && cb.call($el, val, oldVal);
}
});
return {
trigger: function () {
typeof cb === 'function' && cb.call($el, $el.val(), last);
}
};
}
var fadeOptions = {
duration: 100,
queue: false
};
var canvas = document.createElement('canvas');
var saveButton = document.getElementById('save');
function prepareDownload(string, pattern) {
if (!canvas) {
canvas = document.createElement('canvas');
}
var ctx = canvas.getContext('2d');
var img = new Image();
img.onload = function() {
canvas.width = this.width;
canvas.height = this.height;
ctx.drawImage(img, 0, 0);
saveButton.download = string + '.png';
try {
saveButton.href = canvas.toDataURL('image/png');
} catch (err) {
// The above is a security error in IE, so hide the save button
saveButton.style.display = 'none';
}
};
img.src = pattern.toDataUri();
}
var changeEvent = onChange($('#string'), function (val) {
var pattern = GeoPattern.generate(val);
var bg = next();
$('#bg-' + bg.next)
.css('background-image', pattern.toDataUrl())
.stop()
.fadeIn(fadeOptions);
$('#bg-' + bg.prev)
.stop()
.fadeOut(fadeOptions);
prepareDownload(val, pattern);
});
// Some browsers persist field values between refresh
$(function () {
$('#string')
.val(' 请键入内容 ')
.focus();
changeEvent.trigger();
});

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 it is too large Load Diff

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2021-2023 The MindMap Team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

@ -0,0 +1,102 @@
<h1 align="center">Simple mind map</h1>
[![npm-version](https://img.shields.io/npm/v/simple-mind-map)](https://www.npmjs.com/package/simple-mind-map)
![npm download](https://img.shields.io/npm/dm/simple-mind-map)
[![GitHub stars](https://img.shields.io/github/stars/wanglin2/mind-map)](https://github.com/wanglin2/mind-map/stargazers)
[![GitHub issues](https://img.shields.io/github/issues/wanglin2/mind-map)](https://github.com/wanglin2/mind-map/issues)
[![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思维导图
本项目包含两部分:
1.一个js思维导图库不依赖任何框架你可以使用它来快速完成Web思维导图产品的开发。
开发文档:[https://wanglin2.github.io/mind-map/#/doc/zh/](https://wanglin2.github.io/mind-map/#/doc/zh/)
2.一个Web思维导图基于思维导图库、Vue2.x、ElementUI开发可以操作电脑本地文件所以你可以直接把它当做一个在线版思维导图应用使用如果觉得github的响应速度慢你也可以部署到你的服务器上。
在线地址:[https://wanglin2.github.io/mind-map/](https://wanglin2.github.io/mind-map/)
另外也提供了客户端可供下载使用,支持`Windows`、`Mac`及`Linux`,下载地址:
Github[releases](https://github.com/wanglin2/mind-map/releases)。
百度云盘:[地址](https://pan.baidu.com/s/1huasEbKsGNH2Af68dvWiOg?pwd=3bp3)。
# 特性
- [x] 插件化架构,除核心功能外,其他功能作为插件提供,按需使用,减小打包体积
- [x] 支持逻辑结构图、思维导图、组织结构图、目录组织图、时间轴、鱼骨图六种结构
- [x] 内置多种主题,允许高度自定义样式,支持注册新主题
- [x] 支持快捷键
- [x] 节点内容支持图片、图标、超链接、备注、标签、概要
- [x] 支持前进后退
- [x] 支持拖动、缩放
- [x] 支持右键和Ctrl+左键两种多选方式
- [x] 支持节点自由拖拽、拖拽调整
- [x] 支持多种节点形状
- [x] 支持导出为`json`、`png`、`svg`、`pdf`、`markdown`,支持从`json`、`xmind`、`markdown`导入
- [x] 支持小地图、支持水印
- [x] 支持关联线
# 安装
```bash
npm i simple-mind-map
```
# 使用
提供一个宽高不为0的容器元素
```html
<div id="mindMapContainer"></div>
```
另外再设置一下`css`样式:
```css
#mindMapContainer * {
margin: 0;
padding: 0;
}
```
然后创建一个实例:
```js
import MindMap from "simple-mind-map";
const mindMap = new MindMap({
el: document.getElementById('mindMapContainer'),
data: {
"data": {
"text": "根节点"
},
"children": []
}
});
```
即可得到一个思维导图。
想要实现更多功能?可以查看[开发文档](https://wanglin2.github.io/mind-map/#/doc/zh/)。
# License
MIT
# 微信交流群
<img src="./qrcode.jpg" style="width: 300px" />
# 请作者喝杯咖啡
> 厚椰乳一盒 + 纯牛奶半盒 + 冰块 + 咖啡液 = 生椰拿铁 yyds
<p>
<img src="./web/src/assets/img/alipay.jpg" style="width: 300px" />
<img src="./web/src/assets/img/wechat.jpg" style="width: 300px" />
</p>

@ -0,0 +1,15 @@
const fs = require('fs')
const path = require('path')
const src = path.resolve(__dirname, './dist/index.html')
const dest = path.resolve(__dirname, './index.html')
if (fs.existsSync(dest)) {
fs.unlinkSync(dest)
}
if (fs.existsSync(src)) {
fs.copyFileSync(src, dest)
fs.unlinkSync(src)
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0a3179"],{"0168":function(v,s,n){"use strict";n.r(s);var _=function(){var v=this;v._self._c;return v._m(0)},i=[function(){var v=this,s=v._self._c;return s("div",[s("h1",[v._v("MiniMap插件")]),s("blockquote",[s("p",[v._v("v0.2.11+")])]),s("p",[v._v("用于帮助快速开发小地图功能,小地图由两部分组成,一个是当前的画布内容,一个是视口框,当缩放、移动、元素过多时画布上可能只显示了思维导图的部分内容,可以通过视口框来查看当前视口所在位置,以及可以通过在小地图上拖动来快速定位。")]),s("h2",[v._v("注册")]),s("pre",{staticClass:"hljs"},[s("code",[s("span",{staticClass:"hljs-keyword"},[v._v("import")]),v._v(" MindMap "),s("span",{staticClass:"hljs-keyword"},[v._v("from")]),v._v(" "),s("span",{staticClass:"hljs-string"},[v._v("'simple-mind-map'")]),v._v("\n"),s("span",{staticClass:"hljs-keyword"},[v._v("import")]),v._v(" MiniMap "),s("span",{staticClass:"hljs-keyword"},[v._v("from")]),v._v(" "),s("span",{staticClass:"hljs-string"},[v._v("'simple-mind-map/src/plugins/MiniMap.js'")]),v._v("\n"),s("span",{staticClass:"hljs-comment"},[v._v("// import MiniMap from 'simple-mind-map/src/MiniMap.js' v0.6.0以下版本使用该路径")]),v._v("\n\nMindMap.usePlugin(MiniMap)\n")])]),s("p",[v._v("注册完且实例化"),s("code",[v._v("MindMap")]),v._v("后可通过"),s("code",[v._v("mindMap.miniMap")]),v._v("获取到该实例。")]),s("h2",[v._v("方法")]),s("h3",[v._v("calculationMiniMap(boxWidth, boxHeight)")]),s("p",[v._v("计算小地图的渲染数据,该函数内会调用"),s("code",[v._v("getMiniMap()")]),v._v("方法,所以一般使用该函数即可。")]),s("p",[s("code",[v._v("boxWidth")]),v._v(":小地图容器的宽度")]),s("p",[s("code",[v._v("boxHeight")]),v._v(":小地图容器的高度")]),s("p",[v._v("函数返回内容:")]),s("pre",{staticClass:"hljs"},[s("code",[v._v("{\n svgHTML, "),s("span",{staticClass:"hljs-comment"},[v._v("// 小地图html")]),v._v("\n viewBoxStyle, "),s("span",{staticClass:"hljs-comment"},[v._v("// 视图框的位置信息")]),v._v("\n miniMapBoxScale, "),s("span",{staticClass:"hljs-comment"},[v._v("// 视图框的缩放值")]),v._v("\n miniMapBoxLeft, "),s("span",{staticClass:"hljs-comment"},[v._v("// 视图框的left值")]),v._v("\n miniMapBoxTop, "),s("span",{staticClass:"hljs-comment"},[v._v("// 视图框的top值")]),v._v("\n}\n")])]),s("p",[v._v("小地图思路:")]),s("p",[v._v("1.准备一个容器元素"),s("code",[v._v("container")]),v._v(",定位不为"),s("code",[v._v("static")])]),s("p",[v._v("2.在"),s("code",[v._v("container")]),v._v("内创建一个小地图容器元素"),s("code",[v._v("miniMapContainer")]),v._v(",绝对定位")]),s("p",[v._v("3.在"),s("code",[v._v("container")]),v._v("内创建一个视口框元素"),s("code",[v._v("viewBoxContainer")]),v._v(",绝对定位,设置边框样式,过渡属性(可选)")]),s("p",[v._v("4.监听"),s("code",[v._v("data_change")]),v._v("和"),s("code",[v._v("view_data_change")]),v._v("事件,在该事件内调用"),s("code",[v._v("calculationMiniMap")]),v._v("方法获取计算数据,然后将"),s("code",[v._v("svgHTML")]),v._v("渲染到"),s("code",[v._v("miniMapContainer")]),v._v("元素内,并且设置"),s("code",[v._v("miniMapContainer")]),v._v("元素的样式:")]),s("pre",{staticClass:"hljs"},[s("code",[v._v(":style="),s("span",{staticClass:"hljs-string"},[v._v("\"{\n transform: `scale(${miniMapBoxScale})`,\n left: miniMapBoxLeft + 'px',\n top: miniMapBoxTop + 'px',\n}\"")]),v._v("\n")])]),s("p",[v._v("5.将"),s("code",[v._v("viewBoxStyle")]),v._v("对象设置为"),s("code",[v._v("viewBoxContainer")]),v._v("元素的样式")]),s("p",[v._v("到这一步,当画布上的思维导图变化了,小地图也会实时更新,并且视口框元素会实时反映视口在思维导图图形上的位置")]),s("p",[v._v("6.监听"),s("code",[v._v("container")]),v._v("元素的"),s("code",[v._v("mousedown")]),v._v("、"),s("code",[v._v("mousemove")]),v._v("、"),s("code",[v._v("mouseup")]),v._v("事件,分别调用下面即将介绍的三个方法即可实现鼠标拖动时画布上的思维导图也随之拖动的效果")]),s("h3",[v._v("onMousedown(e)")]),s("p",[v._v("小地图鼠标按下事件执行该函数")]),s("p",[s("code",[v._v("e")]),v._v(":事件对象")]),s("h3",[v._v("onMousemove(e, sensitivityNum = 5)")]),s("p",[v._v("小地图鼠标移动事件执行该函数")]),s("p",[s("code",[v._v("e")]),v._v(":事件对象")]),s("p",[s("code",[v._v("sensitivityNum")]),v._v(":拖动灵敏度,灵敏度越大,在小地图上拖动相同距离时实际上的画布拖动距离就越大")]),s("h3",[v._v("onMouseup()")]),s("p",[v._v("小地图鼠标松开事件执行该函数")])])}],a={},e=a,o=n("2877"),t=Object(o["a"])(e,_,i,!1,null,null,null);s["default"]=t.exports}}]);

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0a514a"],{"08d0":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("Markdown解析")]),a("blockquote",[a("p",[s._v("v0.4.7+")])]),a("p",[s._v("提供导入和导出"),a("code",[s._v("Markdown")]),s._v("文件的方法。")]),a("h2",[s._v("引入")]),a("pre",{staticClass:"hljs"},[a("code",[a("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" markdown "),a("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),a("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/parse/markdown.js'")]),s._v("\n")])]),a("p",[s._v("如果使用的是"),a("code",[s._v("umd")]),s._v("格式的文件,那么可以通过如下方式获取:")]),a("pre",{staticClass:"hljs"},[a("code",[a("span",{staticClass:"hljs-tag"},[s._v("<"),a("span",{staticClass:"hljs-name"},[s._v("script")]),s._v(" "),a("span",{staticClass:"hljs-attr"},[s._v("src")]),s._v("="),a("span",{staticClass:"hljs-string"},[s._v('"simple-mind-map/dist/simpleMindMap.umd.min.js"')]),s._v(">")]),a("span",{staticClass:"hljs-tag"},[s._v("</"),a("span",{staticClass:"hljs-name"},[s._v("script")]),s._v(">")]),s._v("\n")])]),a("pre",{staticClass:"hljs"},[a("code",[s._v("simpleMindMap.markdown\n")])]),a("h2",[s._v("方法")]),a("h3",[s._v("transformToMarkdown(data)")]),a("ul",[a("li",[a("code",[s._v("data")]),s._v(":思维导图数据,可以通过"),a("code",[s._v("mindMap.getData()")]),s._v("方法获取。")])]),a("p",[s._v("将思维导图数据转换成"),a("code",[s._v("Markdown")]),s._v("格式数据,返回的是字符串。")]),a("h3",[s._v("transformMarkdownTo(mdContent)")]),a("ul",[a("li",[a("code",[s._v("mdContent")]),s._v(":要转换的"),a("code",[s._v("Markdown")]),s._v("数据,字符串类型。")])]),a("p",[s._v("将"),a("code",[s._v("Markdown")]),s._v("字符串转换成节点树数据,返回一个"),a("code",[s._v("Promise")]),s._v("实例。可以使用"),a("code",[s._v("mindMap.setData()")]),s._v("方法将转换后的数据渲染到画布上。")])])}],_={},d=_,o=t("2877"),l=Object(o["a"])(d,n,v,!1,null,null,null);a["default"]=l.exports}}]);

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0aa579"],{1136: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("参与翻译")]),_("blockquote",[_("p",[v._v("感谢"),_("a",{attrs:{href:"https://github.com/emircanerkul"}},[v._v("Emircan ERKUL")]),v._v("提供的第一版英文翻译。")]),_("p",[v._v("因为精力有限,目前大部分翻译都是使用机翻的,所以准确度难免有问题。")]),_("p",[v._v("目前【教程】部分是没有进行翻译的,如果你有兴趣,欢迎加入我们。")])]),_("p",[v._v("如果你也想参与翻译本文档的话,可以先克隆本仓库。")]),_("p",[v._v("翻译的文档在"),_("code",[v._v("/web/src/pages/Doc/")]),v._v("目录下,目前支持英文("),_("code",[v._v("en")]),v._v(")、简体中文("),_("code",[v._v("zh")]),v._v(")两种语言。")]),_("p",[v._v("如果是新增一种语言类型,那么可以在"),_("code",[v._v("/web/src/pages/Doc/")]),v._v("目录下创建一个新目录,然后给每个章节创建一个文件夹,你也可以直接复制已存在的语言目录下的所有章节目录进行翻译,注意,你只需要编写"),_("code",[v._v("index.md")]),v._v("文件,章节目录下的"),_("code",[v._v("index.vue")]),v._v("文件是脚本根据"),_("code",[v._v("index.md")]),v._v("自动生成的。")]),_("p",[v._v("如果是给已存在的语言类型新增翻译章节,可以在目标语言目录下创建新的章节目录,目录下只需要创建"),_("code",[v._v("index.md")]),v._v("文件即可。")]),_("p",[v._v("当你完成翻译后,可以直接提交"),_("code",[v._v("Pull requests")]),v._v("。")]),_("p",[v._v("如果你是前端程序员,想运行服务,查看文档页面的效果,如果新增章节,需要修改"),_("code",[v._v("/web/src/pages/Doc/catalogList.js")]),v._v("文件,在"),_("code",[v._v("StartList")]),v._v("或者"),_("code",[v._v("APIList")]),v._v("数组里选择合适的位置插入新章节的"),_("code",[v._v("path")]),v._v("。然后需要在"),_("code",[v._v("web")]),v._v("目录下运行"),_("code",[v._v("npm run buildDoc")]),v._v("编译目录和路由,最后"),_("code",[v._v("npm run serve")]),v._v("启动本地服务,打开以下路径即可查看文档:")]),_("p",[_("code",[v._v("ip:port/#/doc/zh/introduction")])])])}],d={},n=d,t=e("2877"),p=Object(t["a"])(n,c,o,!1,null,null,null);_["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

@ -0,0 +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()")]),e("p",[t._v("Zoom out")]),e("h3",[t._v("enlarge()")]),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)")]),e("blockquote",[e("p",[t._v("v0.2.17+")])]),e("p",[t._v("Setting Zoom")])])}],v={},r=v,s=o("2877"),_=Object(s["a"])(r,a,n,!1,null,null,null);e["default"]=_.exports}}]);

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0afe0d"],{"0fcd":function(s,a,t){"use strict";t.r(a);var n=function(){var s=this;s._self._c;return s._m(0)},e=[function(){var s=this,a=s._self._c;return a("div",[a("h1",[s._v("插入/删除节点、前进回退")]),a("p",[s._v("首先和操作节点内容一样,也需要监听节点的激活事件,然后禁用相关按钮。")]),a("h2",[s._v("插入子节点")]),a("p",[s._v("插入子节点很节点,执行"),a("code",[s._v("INSERT_CHILD_NODE")]),s._v("命令即可:")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.execCommand("),a("span",{staticClass:"hljs-string"},[s._v("'INSERT_CHILD_NODE'")]),s._v(")\n")])]),a("p",[s._v("这样就会在当前激活节点(如果存在多个激活节点,默认会操作第一个激活节点)下添加一个子节点。")]),a("p",[a("code",[s._v("INSERT_CHILD_NODE")]),s._v("命令还支持传入几个参数详细详细请阅读【API】-【构造函数】-【execCommand方法】。")]),a("h2",[s._v("插入兄弟节点")]),a("p",[s._v("插入兄弟节点和插入子节点方式完全一致:")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.execCommand("),a("span",{staticClass:"hljs-string"},[s._v("'INSERT_NODE'")]),s._v(")\n")])]),a("h2",[s._v("删除节点")]),a("p",[s._v("删除节点也是执行命令:")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.execCommand("),a("span",{staticClass:"hljs-string"},[s._v("'REMOVE_NODE'")]),s._v(")\n")])]),a("p",[s._v("会删除当前激活的所有节点。")]),a("h2",[s._v("前进回退")]),a("p",[s._v("首先需要监听"),a("code",[s._v("back_forward")]),s._v("事件,事件回调中可以获取当前的历史记录总数,以及当前所在的历史记录索引,那么就可以判断当前是否处于历史记录的最开始,还是最后,然后对前进回退按钮进行禁用。")]),a("pre",{staticClass:"hljs"},[a("code",[a("span",{staticClass:"hljs-keyword"},[s._v("const")]),s._v(" isStart = ref("),a("span",{staticClass:"hljs-literal"},[s._v("true")]),s._v(")\n"),a("span",{staticClass:"hljs-keyword"},[s._v("const")]),s._v(" isEnd = ref("),a("span",{staticClass:"hljs-literal"},[s._v("true")]),s._v(")\nmindMap.on("),a("span",{staticClass:"hljs-string"},[s._v("'back_forward'")]),s._v(", "),a("span",{staticClass:"hljs-function"},[s._v("("),a("span",{staticClass:"hljs-params"},[s._v("index, len")]),s._v(") =>")]),s._v(" {\n isStart.value = index <= "),a("span",{staticClass:"hljs-number"},[s._v("0")]),s._v("\n isEnd.value = index >= len - "),a("span",{staticClass:"hljs-number"},[s._v("1")]),s._v("\n})\n")])]),a("p",[s._v("然后前进回退调用相关命令即可:")]),a("pre",{staticClass:"hljs"},[a("code",[a("span",{staticClass:"hljs-comment"},[s._v("// 回退一次")]),s._v("\nmindMap.execCommand("),a("span",{staticClass:"hljs-string"},[s._v("'BACK'")]),s._v(")\n\n"),a("span",{staticClass:"hljs-comment"},[s._v("// 前进一次")]),s._v("\nmindMap.execCommand("),a("span",{staticClass:"hljs-string"},[s._v("'FORWARD'")]),s._v(")\n")])]),a("h2",[s._v("完整示例")]),a("iframe",{staticStyle:{width:"100%",height:"455px",border:"none"},attrs:{src:"https://wanglin2.github.io/playground/#eNrFVt1qG0cUfpXTLUVykVYy9EqVRBxZpaaxXZTSXmSCWe2OpGl2Z5bdkeRgBCYkkP7RtKWU1tCm0NJetKUXpRCnIS/jtZ236Jmd/dMPWLmKYMXOnHO+78ycM9/OkbHl++ZkTI2G0QztgPkSQirHfptw5vkikHAEAR1UQPBdMeaSOhUIR5brimmPDmAGg0B4UEKEUhaxy7iza/naRIwQp11a9XC26lk+MQgHINylEtSc8mwBH7su4YTXanD519/Rs2+jT764fH4Snfz44viYcFvwUAILb0oLCVoqpbIMxnQjN3W5M29QJAgXPfsGsc6fH5//8/Tih/uXn967uPckevjd5c+/p8GWLdmE7gmHhgiRL6986zbiaJS5RPqWfQc9yxvQasORokpWYtJDaneE51ncKZeub3XeKyHCLAWJ15SCDEQwtQKV9FU47+z3PtrqbRehzr/8Onrwa/TgfvTfT3pJ2U7wkAZSLWYN5J29m93eBwd7+9vdFeh/PloF3Rkx13k5/M67Oze2l1iih49ffP/LPIVDsS/iUqyB3uvu7n/YncfN+rS8HK36jE7T/izHJgDqNsAR9tijXJpDKrsuVa/X7+4gRRLZEVxajNOgtFHRUY4lrYZGVz9iqAliFKb0tKSHUk0T4/zxk2St8QlQv1kCphxtta0B5cr5Vo6xALeSZZHp7PTzi9PfFsnmCVeQ3s5tRb9XlEH6msylcYwz2RMibvD3RcgkExwjSy4dyFIFSjaWDssUR8023tYyAIDtdnHyVfToD52TloOz08/Onv5bbC/ByyWOyAdaEhCwrIYVUP83WCjznoKibJgTyx2rlk39NH3CTmR2+LWOrCZWqnKQqIJiRhM9rIBLeZEVt0DLYMYZ+0GzBfXcA9Vwwd5uKSSowmaam3qaNa36qPc4kBSl2pIURwBNh03Adq0wbBEjyXObeoIYsTlxYE5uzU4JujRraC06pkhSCLdvKRdtJLLZH0spOFyzXWbfQRe1EcSASZUNcPRasl6M0LvXrOmABADxFwGSTZzDwB1RCHEVrkbIVTQHKdYbt3IoR9DGPTfay2K8LkGmpeuzpKJ8NUWupWugF8V4ATovZfrWrBU6BYehvOvqprmW3AGIYdb0hz9RW5OGnmmHITGyM2kWmirt7ilz5KgBm/X6G7EfgJ8d8oAiI2YfG2J9UM/ri82XQuWBVj8U7ljqQMBjMJANqCcjKfx8sEw/omw4Qve36nX/MGVezftmyuxZwZAhb4rqW47D+DCdyFI3k7OwZsabaQZJ0tkYAfEcxzUwKoaugLpqmR+HguPNLobHlosNWIFMvImBFzet2GYNX80AP53Mo6pY1X4gptijCEKMRHxXXOZ07HKpVVSS28yY/Q8ZbqFI"}})])}],i={},l=i,v=t("2877"),c=Object(v["a"])(l,n,e,!1,null,null,null);a["default"]=c.exports}}]);

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b1c6f"],{"20fa":function(s,v,e){"use strict";e.r(v);var i=function(){var s=this;s._self._c;return s._m(0)},_=[function(){var s=this,v=s._self._c;return v("div",[v("h1",[s._v("AssociativeLine 插件")]),v("blockquote",[v("p",[s._v("v0.4.5+")])]),v("blockquote",[v("p",[s._v("调整关联线控制点的功能从v0.4.6+开始支持")])]),v("blockquote",[v("p",[s._v("关联性支持文本编辑从v0.5.11+开始支持")])]),v("p",[s._v("该插件用于支持添加关联线。")]),v("h2",[s._v("注册")]),v("pre",{staticClass:"hljs"},[v("code",[v("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" MindMap "),v("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),v("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map'")]),s._v("\n"),v("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" AssociativeLine "),v("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),v("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/plugins/AssociativeLine.js'")]),s._v("\n"),v("span",{staticClass:"hljs-comment"},[s._v("// import AssociativeLine from 'simple-mind-map/src/AssociativeLine.js' v0.6.0以下版本使用该路径")]),s._v("\n\nMindMap.usePlugin(AssociativeLine)\n")])]),v("p",[s._v("注册完且实例化"),v("code",[s._v("MindMap")]),s._v("后可通过"),v("code",[s._v("mindMap.associativeLine")]),s._v("获取到该实例。")]),v("h2",[s._v("配置")]),v("p",[s._v("支持修改关联线的粗细和颜色,分为默认状态和激活状态。配置如下:")]),v("ul",[v("li",[v("p",[v("code",[s._v("associativeLineWidth")]),s._v(":关联线默认状态的粗细,默认值为"),v("code",[s._v("2")])])]),v("li",[v("p",[v("code",[s._v("associativeLineColor")]),s._v(":关联线默认状态的颜色,默认值为"),v("code",[s._v("rgb(51, 51, 51)")])])]),v("li",[v("p",[v("code",[s._v("associativeLineActiveWidth")]),s._v(":关联线激活状态的粗细,默认值为"),v("code",[s._v("8")])])]),v("li",[v("p",[v("code",[s._v("associativeLineActiveColor")]),s._v(":关联线激活状态的颜色,默认值为"),v("code",[s._v("rgba(2, 167, 240, 1)")])])])]),v("p",[s._v("配置以主题的方式提供,所以如果想要修改这四个属性,可以通过"),v("code",[s._v("mindMap.setThemeConfig(config)")]),s._v("方法进行修改。")]),v("h2",[s._v("属性")]),v("h3",[s._v("mindMap.associativeLine.lineList")]),v("p",[s._v("当前所有连接线数据,数组类型,数组的每一项也是一个数组:")]),v("pre",{staticClass:"hljs"},[v("code",[s._v("[\n path, "),v("span",{staticClass:"hljs-comment"},[s._v("// 连接线节点")]),s._v("\n clickPath, "),v("span",{staticClass:"hljs-comment"},[s._v("// 不可见的点击线节点")]),s._v("\n node, "),v("span",{staticClass:"hljs-comment"},[s._v("// 起始节点")]),s._v("\n toNode "),v("span",{staticClass:"hljs-comment"},[s._v("// 目标节点")]),s._v("\n]\n")])]),v("h3",[s._v("mindMap.associativeLine.activeLine")]),v("p",[s._v("当前激活的连接线,数组类型,同"),v("code",[s._v("lineList")]),s._v("数组的每一项的结构。")]),v("h2",[s._v("方法")]),v("h3",[s._v("renderAllLines()")]),v("p",[s._v("重新渲染所有关联线。")]),v("h3",[s._v("removeAllLines()")]),v("p",[s._v("移除所有关联线。")]),v("h3",[s._v("createLineFromActiveNode()")]),v("p",[s._v("从当前激活节点开始创建关联线,如果有多个激活节点,默认为第一个节点。")]),v("p",[s._v("调用该方法后,会从第一个激活节点到当前鼠标实时位置渲染一条关联线,当点击某个目标节点后则代表创建完成,会在第一个激活节点和点击节点之间渲染一条关联线。")]),v("h3",[s._v("createLine(fromNode)")]),v("p",[s._v("从指定节点开始创建关联线。")]),v("p",[s._v("调用该方法后,会从指定节点到当前鼠标实时位置渲染一条关联线,当点击某个目标节点后则代表创建完成,会在指定节点和点击节点之间渲染一条关联线。")]),v("h3",[s._v("addLine(fromNode, toNode)")]),v("p",[s._v("直接添加一条关联线。")]),v("p",[s._v("调用该方法,会直接创建一条从"),v("code",[s._v("fromNode")]),s._v("到"),v("code",[s._v("toNode")]),s._v("节点的关联线。")]),v("h3",[s._v("removeLine()")]),v("p",[s._v("删除当前激活的关联线。点击某条关联线则视为激活。")]),v("h3",[s._v("clearActiveLine()")]),v("p",[s._v("清除当前激活的关联线的激活状态。")])])}],n={},a=n,o=e("2877"),t=Object(o["a"])(a,i,_,!1,null,null,null);v["default"]=t.exports}}]);

@ -0,0 +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}}]);

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b91e5"],{"321a":function(s,e,t){"use strict";t.r(e);var n=function(){var s=this;s._self._c;return s._m(0)},l=[function(){var s=this,e=s._self._c;return e("div",[e("h1",[s._v("Select 插件")]),e("p",[e("code",[s._v("Select")]),s._v("插件提供鼠标右键多选节点的功能。")]),e("h2",[s._v("注册")]),e("pre",{staticClass:"hljs"},[e("code",[e("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" MindMap "),e("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),e("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map'")]),s._v("\n"),e("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" Select "),e("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),e("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/plugins/Select.js'")]),s._v("\n"),e("span",{staticClass:"hljs-comment"},[s._v("// import Select from 'simple-mind-map/src/Select.js' v0.6.0以下版本使用该路径")]),s._v("\n\nMindMap.usePlugin(Select)\n")])]),e("p",[s._v("注册完且实例化"),e("code",[s._v("MindMap")]),s._v("后可通过"),e("code",[s._v("mindMap.select")]),s._v("获取到该实例。")]),e("h2",[s._v("方法")]),e("h3",[s._v("toPos(x, y)")]),e("p",[s._v("转换鼠标位置为相对于容器"),e("code",[s._v("el")]),s._v("的位置")])])}],a={},c=a,i=t("2877"),v=Object(i["a"])(c,n,l,!1,null,null,null);e["default"]=v.exports}}]);

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b92c3"],{"328f":function(e,t,o){"use strict";o.r(t);var n=function(){var e=this;e._self._c;return e._m(0)},a=[function(){var e=this,t=e._self._c;return t("div",[t("h1",[e._v("KeyboardNavigation plugin")]),t("blockquote",[t("p",[e._v("v0.2.17+")])]),t("p",[t("code",[e._v("KeyboardNavigation")]),e._v(" plugin provides keyboard navigation function, that is, when you press the direction key, it will automatically find the next node and activate it.")]),t("h2",[e._v("Register")]),t("pre",{staticClass:"hljs"},[t("code",[t("span",{staticClass:"hljs-keyword"},[e._v("import")]),e._v(" MindMap "),t("span",{staticClass:"hljs-keyword"},[e._v("from")]),e._v(" "),t("span",{staticClass:"hljs-string"},[e._v("'simple-mind-map'")]),e._v("\n"),t("span",{staticClass:"hljs-keyword"},[e._v("import")]),e._v(" KeyboardNavigation "),t("span",{staticClass:"hljs-keyword"},[e._v("from")]),e._v(" "),t("span",{staticClass:"hljs-string"},[e._v("'simple-mind-map/src/plugins/KeyboardNavigation.js'")]),e._v("\n"),t("span",{staticClass:"hljs-comment"},[e._v("// import KeyboardNavigation from 'simple-mind-map/src/KeyboardNavigation.js' Use this path for versions below v0.6.0")]),e._v("\n\nMindMap.usePlugin(KeyboardNavigation)\n")])]),t("p",[e._v("After registration and instantiation of "),t("code",[e._v("MindMap")]),e._v(", the instance can be obtained through "),t("code",[e._v("mindMap.keyboardNavigation")]),e._v(".")]),t("h2",[e._v("Methods")]),t("h3",[e._v("focus(dir)")]),t("p",[t("code",[e._v("dir")]),e._v("Which direction to find the next nodeOptional value"),t("code",[e._v("Left")]),e._v("、 "),t("code",[e._v("Up")]),e._v("、 "),t("code",[e._v("Right")]),e._v("、 "),t("code",[e._v("Down")])]),t("p",[e._v("Focus on the next node")]),t("h3",[e._v("getNodeRect(node)")]),t("p",[t("code",[e._v("node")]),e._v("Node")]),t("p",[e._v("Get the location information of the node and return an object:")]),t("pre",{staticClass:"hljs"},[t("code",[e._v("{\n left,\n top,\n right,\n bottom\n}\n")])]),t("h3",[e._v("getDistance(node1Rect, node2Rect)")]),t("p",[t("code",[e._v("node1Rect")]),e._v("、"),t("code",[e._v("node2Rect")]),e._v("The location data of nodes can be obtained through the "),t("code",[e._v("getNodeRect(node)")])]),t("p",[e._v("Get the distance between two nodes")]),t("h3",[e._v("getCenter(nodeRect)")]),t("p",[t("code",[e._v("nodeRect")]),e._v("The location data of nodes can be obtained through the "),t("code",[e._v("getNodeRect(node)")])]),t("p",[e._v("Get the center point of the node")])])}],i={},s=i,d=o("2877"),v=Object(d["a"])(s,n,a,!1,null,null,null);t["default"]=v.exports}}]);

File diff suppressed because one or more lines are too long

@ -0,0 +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鱼骨图。")]),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"}})])}],l={},e=l,o=a("2877"),p=Object(o["a"])(e,n,i,!1,null,null,null);s["default"]=p.exports}}]);

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0bd54e"],{"2c18":function(e,o,v){"use strict";v.r(o);var t=function(){var e=this;e._self._c;return e._m(0)},n=[function(){var e=this,o=e._self._c;return o("div",[o("h1",[e._v("KeyboardNavigation插件")]),o("blockquote",[o("p",[e._v("v0.2.17+")])]),o("p",[o("code",[e._v("KeyboardNavigation")]),e._v("插件提供键盘导航的功能,也就是当你按下方向键时会自动寻找下一个节点并激活")]),o("h2",[e._v("注册")]),o("pre",{staticClass:"hljs"},[o("code",[o("span",{staticClass:"hljs-keyword"},[e._v("import")]),e._v(" MindMap "),o("span",{staticClass:"hljs-keyword"},[e._v("from")]),e._v(" "),o("span",{staticClass:"hljs-string"},[e._v("'simple-mind-map'")]),e._v("\n"),o("span",{staticClass:"hljs-keyword"},[e._v("import")]),e._v(" KeyboardNavigation "),o("span",{staticClass:"hljs-keyword"},[e._v("from")]),e._v(" "),o("span",{staticClass:"hljs-string"},[e._v("'simple-mind-map/src/plugins/KeyboardNavigation.js'")]),e._v("\n"),o("span",{staticClass:"hljs-comment"},[e._v("// import KeyboardNavigation from 'simple-mind-map/src/KeyboardNavigation.js' v0.6.0以下版本使用该路径")]),e._v("\n\nMindMap.usePlugin(KeyboardNavigation)\n")])]),o("p",[e._v("注册完且实例化"),o("code",[e._v("MindMap")]),e._v("后可通过"),o("code",[e._v("mindMap.keyboardNavigation")]),e._v("获取到该实例。")]),o("h2",[e._v("方法")]),o("h3",[e._v("focus(dir)")]),o("p",[o("code",[e._v("dir")]),e._v(":要寻找哪个方向的下一个节点,可选值:"),o("code",[e._v("Left")]),e._v("、 "),o("code",[e._v("Up")]),e._v("、 "),o("code",[e._v("Right")]),e._v("、 "),o("code",[e._v("Down")])]),o("p",[e._v("聚焦到下一个节点")]),o("h3",[e._v("getNodeRect(node)")]),o("p",[o("code",[e._v("node")]),e._v(":节点")]),o("p",[e._v("获取节点的位置信息,返回一个对象:")]),o("pre",{staticClass:"hljs"},[o("code",[e._v("{\n left,\n top,\n right,\n bottom\n}\n")])]),o("h3",[e._v("getDistance(node1Rect, node2Rect)")]),o("p",[o("code",[e._v("node1Rect")]),e._v("、"),o("code",[e._v("node2Rect")]),e._v(":节点的位置数据,可通过"),o("code",[e._v("getNodeRect(node)")]),e._v("方法获取")]),o("p",[e._v("获取两个节点的距离")]),o("h3",[e._v("getCenter(nodeRect)")]),o("p",[o("code",[e._v("nodeRect")]),e._v(":节点的位置数据,可通过"),o("code",[e._v("getNodeRect(node)")]),e._v("方法获取")]),o("p",[e._v("获取节点的中心点")])])}],s={},a=s,_=v("2877"),d=Object(_["a"])(a,t,n,!1,null,null,null);o["default"]=d.exports}}]);

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0be174"],{"2f7a":function(t,e,s){"use strict";s.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("KeyCommand instance")]),e("p",[t._v("The "),e("code",[t._v("keyCommand")]),t._v(" instance is responsible for adding and triggering shortcuts. It includes some built-in shortcuts and can also be added manually. The "),e("code",[t._v("mindMap.keyCommand")]),t._v(" instance can be obtained through this.")]),e("h2",[t._v("Methods")]),e("h3",[t._v("addShortcut(key, fn)")]),e("p",[t._v("Add a shortcut")]),e("p",[e("code",[t._v("key")]),t._v(": Shortcut key, key values can be viewed at "),e("a",{attrs:{href:"https://github.com/wanglin2/mind-map/blob/main/simple-mind-map/src/core/command/keyMap.js"}},[t._v("keyMap.js")]),t._v(" Example:")]),e("pre",{staticClass:"hljs"},[e("code",[e("span",{staticClass:"hljs-comment"},[t._v("// Single key")]),t._v("\nmindMap.keyCommand.addShortcut("),e("span",{staticClass:"hljs-string"},[t._v('"Enter"')]),t._v(", "),e("span",{staticClass:"hljs-function"},[t._v("() =>")]),t._v(" {});\n"),e("span",{staticClass:"hljs-comment"},[t._v("// Or")]),t._v("\nmindMap.keyCommand.addShortcut("),e("span",{staticClass:"hljs-string"},[t._v('"Del|Backspace"')]),t._v(", "),e("span",{staticClass:"hljs-function"},[t._v("() =>")]),t._v(" {});\n"),e("span",{staticClass:"hljs-comment"},[t._v("// Combination key")]),t._v("\nmindMap.keyCommand.addShortcut("),e("span",{staticClass:"hljs-string"},[t._v('"Control+Enter"')]),t._v(", "),e("span",{staticClass:"hljs-function"},[t._v("() =>")]),t._v(" {});\n")])]),e("p",[e("code",[t._v("fn")]),t._v(": Method to be executed")]),e("h3",[t._v("removeShortcut(key, fn)")]),e("p",[t._v("Remove a shortcut command, if "),e("code",[t._v("fn")]),t._v(" is not specified, all callback methods for the shortcut will be removed")]),e("h3",[t._v("getShortcutFn(key)")]),e("blockquote",[e("p",[t._v("v0.2.2+")])]),e("p",[t._v("Get the processing function for the specified shortcut")]),e("h3",[t._v("pause()")]),e("blockquote",[e("p",[t._v("v0.2.2+")])]),e("p",[t._v("Pause all shortcut responses")]),e("h3",[t._v("recovery()")]),e("blockquote",[e("p",[t._v("v0.2.2+")])]),e("p",[t._v("Restore shortcut responses")]),e("h3",[t._v("save()")]),e("blockquote",[e("p",[t._v("v0.2.3+")])]),e("p",[t._v("Save the current registered shortcut data, then clear the shortcut data")]),e("h3",[t._v("restore()")]),e("blockquote",[e("p",[t._v("v0.2.3+")])]),e("p",[t._v("Restore saved shortcut data, then clear the cache data")])])}],o={},c=o,v=s("2877"),r=Object(v["a"])(c,a,n,!1,null,null,null);e["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

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0c14fc"],{4604:function(s,a,n){"use strict";n.r(a);var t=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("Drag插件")]),a("p",[a("code",[s._v("Drag")]),s._v("插件提供节点拖拽的功能,包括:")]),a("p",[s._v("1.拖拽节点进行移动,改变节点在节点树中的位置,即作为其他节点的子节点、兄弟节点等等")]),a("p",[s._v("2.拖拽节点到自定义的画布位置")]),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(" Drag "),a("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),a("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/plugins/Drag.js'")]),s._v("\n"),a("span",{staticClass:"hljs-comment"},[s._v("// import Drag from 'simple-mind-map/src/Drag.js' v0.6.0以下版本使用该路径")]),s._v("\n\nMindMap.usePlugin(Drag)\n")])]),a("p",[s._v("注册完且实例化"),a("code",[s._v("MindMap")]),s._v("后可通过"),a("code",[s._v("mindMap.drag")]),s._v("获取到该实例。")])])}],i={},p=i,v=n("2877"),_=Object(v["a"])(p,t,r,!1,null,null,null);a["default"]=_.exports}}]);

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0c1a01"],{"479a":function(e,t,r){"use strict";r.r(t);var o=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("Participate in translation")]),t("blockquote",[t("p",[e._v("Thanks for the first version English translation provided by "),t("a",{attrs:{href:"https://github.com/emircanerkul"}},[e._v("Emircan ERKUL")]),e._v(".")]),t("p",[e._v("Due to limited energy, most translations currently use machine translation, so accuracy is inevitably problematic.")]),t("p",[e._v("At present, the 【Course】 section is not translated. If you are interested, please join us.")])]),t("p",[e._v("If you want to participate in the translation of this document, you can clone this repository first.")]),t("p",[e._v("The translated documents are in the "),t("code",[e._v("/web/src/pages/Doc/")]),e._v(" directory, and currently support English("),t("code",[e._v("en")]),e._v(") and Simplified Chinese("),t("code",[e._v("zh")]),e._v(").")]),t("p",[e._v("If you are adding a new language type, you can create a new directory under the "),t("code",[e._v("/web/src/pages/Doc/")]),e._v(" directory, Then create a folder for each chapter, You can also directly copy all chapter directories under the existing language directory for translation, Note that you only need to write the "),t("code",[e._v("index.md")]),e._v(" file, The "),t("code",[e._v("index.vue")]),e._v(" file under the chapter directory is automatically generated by the script according to "),t("code",[e._v("index.md")]),e._v(".")]),t("p",[e._v("If you are adding a translation chapter to an existing language type, You can create a new chapter directory under the target language directory, You only need to create a "),t("code",[e._v("index.md")]),e._v(" file under the directory.")]),t("p",[e._v("After you complete the translation, you can directly submit "),t("code",[e._v("Pull requests")]),e._v(".")]),t("p",[e._v("If you are a front-end programmer and want to run the service, check the effect of the document page, If a new chapter is added, the file "),t("code",[e._v("/web/src/pages/Doc/catalogList.js")]),e._v(" needs to be modified, Select the appropriate location in the "),t("code",[e._v("StartList")]),e._v(" or "),t("code",[e._v("APIList")]),e._v(" array to insert the "),t("code",[e._v("path")]),e._v(" of the new chapter. Then you need to run "),t("code",[e._v("npm run buildDoc")]),e._v(" under the "),t("code",[e._v("web")]),e._v(" directory to compile the directory and route. Finally, run "),t("code",[e._v("npm run serve")]),e._v(" starts the local service. Open the following path to view the document:")]),t("p",[t("code",[e._v("ip:port/#/doc/zh/introduction")])])])}],a={},i=a,c=r("2877"),d=Object(c["a"])(i,o,n,!1,null,null,null);t["default"]=d.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

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d6590"],{"71bb":function(s,_,v){"use strict";v.r(_);var e=function(){var s=this;s._self._c;return s._m(0)},t=[function(){var s=this,_=s._self._c;return _("div",[_("h1",[s._v("部署")]),_("p",[s._v("本项目的"),_("code",[s._v("web")]),s._v("目录下提供了一个基于"),_("code",[s._v("simple-mind-map")]),s._v("库、"),_("code",[s._v("Vue2.x")]),s._v("、"),_("code",[s._v("ElementUI")]),s._v("开发的完整项目,数据默认存储在电脑本地,此外可以操作电脑本地文件,原意是作为一个线上"),_("code",[s._v("demo")]),s._v(",但是也完全可以直接把它当做一个在线版思维导图应用使用,在线地址:"),_("a",{attrs:{href:"https://wanglin2.github.io/mind-map/"}},[s._v("https://wanglin2.github.io/mind-map/")]),s._v("。")]),_("p",[s._v("如果你的网络环境访问"),_("code",[s._v("GitHub")]),s._v("服务很慢,你也可以部署到你的服务器上。")]),_("h2",[s._v("部署到静态文件服务器")]),_("p",[s._v("项目本身不依赖后端,所以完全可以部署到一个静态文件服务器上,可以依次执行如下命令:")]),_("pre",{staticClass:"hljs"},[_("code",[s._v("git "),_("span",{staticClass:"hljs-built_in"},[s._v("clone")]),s._v(" https://github.com/wanglin2/mind-map.git\n"),_("span",{staticClass:"hljs-built_in"},[s._v("cd")]),s._v(" mind-map\n"),_("span",{staticClass:"hljs-built_in"},[s._v("cd")]),s._v(" simple-mind-map\nnpm i\nnpm link\n"),_("span",{staticClass:"hljs-built_in"},[s._v("cd")]),s._v(" ..\n"),_("span",{staticClass:"hljs-built_in"},[s._v("cd")]),s._v(" web\nnpm i\nnpm link simple-mind-map\n")])]),_("p",[s._v("然后你可以选择启动本地服务:")]),_("pre",{staticClass:"hljs"},[_("code",[s._v("npm run serve\n")])]),_("p",[s._v("也可以直接打包生成构建产物:")]),_("pre",{staticClass:"hljs"},[_("code",[s._v("npm run build\n")])]),_("p",[s._v("打包完后的入口页面"),_("code",[s._v("index.html")]),s._v("可以在项目根目录找到,对应的静态资源在根目录下的"),_("code",[s._v("dist")]),s._v("目录,"),_("code",[s._v("html")]),s._v("文件中会通过相对路径访问"),_("code",[s._v("dist")]),s._v("目录的资源,比如"),_("code",[s._v("dist/xxx")]),s._v("。你可以直接把这两个文件或目录上传到你的静态文件服务器,事实上,本项目就是这样部署到"),_("code",[s._v("GitHub Pages")]),s._v("上的。")]),_("p",[s._v("如果你没有代码修改需求的话,直接从本仓库复制这些文件也是可以的。")]),_("p",[s._v("如果你想把"),_("code",[s._v("index.html")]),s._v("也打包进"),_("code",[s._v("dist")]),s._v("目录,可以修改"),_("code",[s._v("web/package.json")]),s._v("文件的"),_("code",[s._v("scripts.build")]),s._v("命令,把"),_("code",[s._v("vue-cli-service build && node ../copy.js")]),s._v("中的"),_("code",[s._v(" && node ../copy.js")]),s._v("删除即可。")]),_("p",[s._v("如果你想修改打包输出的目录,可以修改"),_("code",[s._v("web/vue.config.js")]),s._v("文件的"),_("code",[s._v("outputDir")]),s._v("配置,改成你想要输出的路径即可。")]),_("p",[s._v("如果你想修改"),_("code",[s._v("index.html")]),s._v("文件引用静态资源的路径的话可以修改"),_("code",[s._v("web/vue.config.js")]),s._v("文件的"),_("code",[s._v("publicPath")]),s._v("配置。")]),_("p",[s._v("另外默认使用的是"),_("code",[s._v("hash")]),s._v("路由,也就是路径中会在"),_("code",[s._v("#")]),s._v(",如果你想使用"),_("code",[s._v("history")]),s._v("路由,可以修改"),_("code",[s._v("web/src/router.js")]),s._v("文件,将:")]),_("pre",{staticClass:"hljs"},[_("code",[_("span",{staticClass:"hljs-keyword"},[s._v("const")]),s._v(" router = "),_("span",{staticClass:"hljs-keyword"},[s._v("new")]),s._v(" VueRouter({\n routes\n})\n")])]),_("p",[s._v("改成:")]),_("pre",{staticClass:"hljs"},[_("code",[_("span",{staticClass:"hljs-keyword"},[s._v("const")]),s._v(" router = "),_("span",{staticClass:"hljs-keyword"},[s._v("new")]),s._v(" VueRouter({\n "),_("span",{staticClass:"hljs-attr"},[s._v("mode")]),s._v(": "),_("span",{staticClass:"hljs-string"},[s._v("'history'")]),s._v(",\n routes\n})\n")])]),_("p",[s._v("不过这需要后台支持因为我们的应用是个单页客户端应用如果后台没有正确的配置当用户在浏览器直接访问子路由时会返回404所以呢你要在服务端增加一个覆盖所有情况的候选资源如果"),_("code",[s._v("URL")]),s._v("匹配不到任何静态资源,则应该返回同一个"),_("code",[s._v("index.html")]),s._v("页面。")]),_("h2",[s._v("Docker")]),_("p",[s._v("编写中。。。")])])}],n={},i=n,c=v("2877"),o=Object(c["a"])(i,e,t,!1,null,null,null);_["default"]=o.exports}}]);

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0da701"],{"6c31":function(e,v,_){"use strict";_.r(v);var o=function(){var e=this;e._self._c;return e._m(0)},d=[function(){var e=this,v=e._self._c;return v("div",[v("h1",[e._v("Render实例")]),v("p",[v("code",[e._v("render")]),e._v("实例负载整个渲染过程,可通过"),v("code",[e._v("mindMap.renderer")]),e._v("获取到")]),v("h2",[e._v("属性")]),v("h3",[e._v("activeNodeList")]),v("p",[e._v("获取当前激活的节点列表")]),v("h3",[e._v("root")]),v("p",[e._v("获取节点树的根节点")]),v("h2",[e._v("方法")]),v("h3",[e._v("clearActive()")]),v("p",[e._v("清除当前激活的节点")]),v("h3",[e._v("clearAllActive()")]),v("p",[e._v("清除当前所有激活节点,并会触发"),v("code",[e._v("node_active")]),e._v("事件")]),v("h3",[e._v("startTextEdit()")]),v("p",[e._v("v0.1.6+)若有文字编辑需求可调用该方法,会禁用回车键和删除键相关快捷键防止冲突")]),v("h3",[e._v("endTextEdit()")]),v("p",[e._v("v0.1.6+)结束文字编辑,会恢复回车键和删除键相关快捷键")]),v("h3",[e._v("addActiveNode(node)")]),v("p",[e._v("添加节点到激活列表里")]),v("h3",[e._v("removeActiveNode(node)")]),v("p",[e._v("在激活列表里移除某个节点")]),v("h3",[e._v("findActiveNodeIndex(node)")]),v("p",[e._v("检索某个节点在激活列表里的索引")]),v("h3",[e._v("getNodeIndex(node)")]),v("p",[e._v("获取节点在同级里的位置索引")]),v("h3",[e._v("removeOneNode(node)")]),v("p",[e._v("删除某个指定节点")]),v("h3",[e._v("copyNode()")]),v("p",[e._v("复制节点,操作节点为当前激活节点,有多个激活节点只会操作第一个节点")]),v("h3",[e._v("setNodeDataRender(node, data)")]),v("p",[e._v("设置节点数据,即"),v("code",[e._v("data")]),e._v("字段的数据,并会根据节点大小是否变化来判断是否需要重新渲染该节点,"),v("code",[e._v("data")]),e._v("为对象,如:"),v("code",[e._v("{text: '我是新文本'}")])]),v("h3",[e._v("moveNodeTo(node, toNode)")]),v("blockquote",[v("p",[e._v("v0.1.5+")])]),v("p",[e._v("移动一个节点作为另一个节点的子节点")]),v("h3",[e._v("insertBefore(node, exist)")]),v("blockquote",[v("p",[e._v("v0.1.5+")])]),v("p",[e._v("将节点移动到另一个节点的前面")]),v("h3",[e._v("insertAfter(node, exist)")]),v("blockquote",[v("p",[e._v("v0.1.5+")])]),v("p",[e._v("将节点移动到另一个节点的后面")]),v("h3",[e._v("moveNodeToCenter(node)")]),v("blockquote",[v("p",[e._v("v0.2.17+")])]),v("p",[e._v("移动节点到画布中心。")]),v("p",[e._v("目前如果是存在缩放的情况下回到中心会重置缩放。")])])}],t={},n=t,c=_("2877"),p=Object(c["a"])(n,o,d,!1,null,null,null);v["default"]=p.exports}}]);

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0db0f2"],{"6df4":function(n,v,_){"use strict";_.r(v);var e=function(){var n=this;n._self._c;return n._m(0)},o=[function(){var n=this,v=n._self._c;return v("div",[v("h1",[n._v("Command实例")]),v("p",[v("code",[n._v("command")]),n._v("实例负责命令的添加及执行,内置了很多命令,也可以自行添加,命令指需要在历史堆栈数据里添加副本的操作。可通过"),v("code",[n._v("mindMap.command")]),n._v("获取到该实例")]),v("h2",[n._v("方法")]),v("h3",[n._v("add(name, fn)")]),v("p",[n._v("添加命令。")]),v("p",[v("code",[n._v("name")]),n._v(":命令名称")]),v("p",[v("code",[n._v("fn")]),n._v(":命令要执行的方法")]),v("h3",[n._v("remove(name, fn)")]),v("p",[n._v("移除命令。")]),v("p",[v("code",[n._v("name")]),n._v(":要移除的命令名称")]),v("p",[v("code",[n._v("fn")]),n._v(":要移除的方法,不传的话移除该命令所有的方法")]),v("h3",[n._v("getCopyData()")]),v("p",[n._v("获取渲染树数据副本")]),v("h3",[n._v("clearHistory()")]),v("p",[n._v("清空历史堆栈数据")])])}],a={},c=a,d=_("2877"),p=Object(d["a"])(c,e,o,!1,null,null,null);v["default"]=p.exports}}]);

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

Loading…
Cancel
Save