Compare commits

..

74 Commits
0.9.2 ... 0.9.6

Author SHA1 Message Date
街角小林
6a4e87af7b 打包0.9.6 2024-01-26 11:33:26 +08:00
街角小林
7354bec8fd Doc: update 2024-01-26 11:19:27 +08:00
街角小林
3405fb7e8a Fix:修复添加了数学公式的节点,切换主题时文本样式没有改变的问题 2024-01-26 11:09:17 +08:00
街角小林
138cc4b3e8 Fix:修复切换主题时,换行的文本样式没有改变的问题 2024-01-26 09:44:09 +08:00
街角小林
e6ede72169 Fix:修复切换主题后,第一次进行文本换行后,新换行的文本样式会丢失的问题 2024-01-26 09:43:17 +08:00
街角小林
edddbbd1d6 Demo:修复大纲中文本换行不生效,显示br标签的问题 2024-01-26 09:05:34 +08:00
街角小林
304e76e4af 删除无用文件 2024-01-26 08:49:26 +08:00
街角小林
b4ceb88d18 Doc: update 2024-01-26 08:43:14 +08:00
街角小林
635fdf4806 Demo:新增两个主题 2024-01-26 08:40:31 +08:00
街角小林
77d376210e Doc: update 2024-01-25 18:25:36 +08:00
街角小林
12f9e03f63 Demo:大纲支持按Shift+Tab将节点上移一个层级 2024-01-25 15:24:41 +08:00
街角小林
a4f83437c9 Feat:新增MOVE_UP_ONE_LEVEL命令将节点上移一个层级 2024-01-25 15:19:11 +08:00
街角小林
a5b3efd272 Doc: update 2024-01-25 14:11:43 +08:00
街角小林
7bd467a330 Fix:修复切换主题时,被收起的节点样式没有变化的问题 2024-01-25 13:52:23 +08:00
街角小林
59b2506884 Feat:Mac双指触摸事件移动画布增加一点灵敏度 2024-01-25 08:58:33 +08:00
街角小林
cf87333910 Feat:直连风格根节点的连线起点统一为节点的边界 2024-01-24 18:51:39 +08:00
街角小林
95b957d37e Feat:主题新增字段用于设置曲线连接下根节点连线的起始位置 2024-01-24 18:28:04 +08:00
街角小林
7d18f98a33 Feat:支持设置节点连线箭头的显示位置,头部或者尾部 2024-01-24 17:52:48 +08:00
街角小林
6baf388d95 update 2024-01-22 19:59:17 +08:00
街角小林
d63d01647c 打包0.9.5 2024-01-22 19:56:20 +08:00
街角小林
70c6a26de0 Doc: update 2024-01-22 19:53:38 +08:00
街角小林
8241bcbbb4 Demo:优化代码 2024-01-19 17:45:48 +08:00
街角小林
89fd59adec Demo:支持开启手绘风格 2024-01-19 16:29:50 +08:00
街角小林
9b1f26f6e9 Feat:支持自定义创建节点形状的方法 2024-01-19 15:50:32 +08:00
街角小林
e590161f0a Doc: update 2024-01-17 18:19:48 +08:00
街角小林
2fe804880f Demo:优化移动端的使用体验 2024-01-16 18:30:41 +08:00
街角小林
bbb21d4e76 Feat:优化创建关联线时初始端点位置的计算逻辑 2024-01-16 10:10:32 +08:00
街角小林
3f9c3e9fb1 Doc: update 2024-01-16 08:41:25 +08:00
街角小林
925c5d6d3c Feat:增加禁止调整关联线端点位置的配置 2024-01-15 18:34:19 +08:00
街角小林
bb223b080c Feat:增加设置关联线创建时两个端点初始位置的配置 2024-01-15 18:31:40 +08:00
街角小林
c3652331ea Fix:修复新创建的关联线位置始终在节点的右侧没有根据相对位置调整的问题 2024-01-15 17:50:24 +08:00
街角小林
62c61b6e53 Fix:修复展开收起节点时区间概要会丢失的问题 2024-01-15 17:11:16 +08:00
街角小林
88db910c68 打包0.9.4 2024-01-12 11:12:43 +08:00
街角小林
7a8b83b9b4 Doc: update 2024-01-12 11:05:13 +08:00
街角小林
74b1a082fe Demo:1.基础样式中一些仅支持部分结构的配置根据当前结构进行显示和隐藏。2.导入文件时自动隐藏侧边栏。3.新增连线圆角的配置 2024-01-12 10:23:20 +08:00
街角小林
ac930daa11 Feat:主题配置增加lineRadius属性配置直线连接时的圆角大小 2024-01-12 09:04:33 +08:00
街角小林
836a335d75 Fix 2024-01-11 18:02:30 +08:00
街角小林
b5cfca848a Fix:修复删除含有子节点的节点时,data_change_detail事件报错 2024-01-11 17:55:10 +08:00
街角小林
cd7936a50b Fix:修复节点富文本编辑时清除样式后文字样式丢失并且切换主题也不会恢复的问题 2024-01-11 10:05:56 +08:00
街角小林
ecc15ea572 Demo:大纲里去掉节点的公式内容 2024-01-11 09:10:57 +08:00
街角小林
7c6c6341e8 Doc: update 2024-01-11 08:50:54 +08:00
wanglin2
d7bd57ffac Fix:修复mac上useLeftKeySelectionRightKeyDrag为true 时无法按住ctrl键多选节点的问题 2024-01-10 21:49:30 +08:00
街角小林
69264e3a9d Fix:修复被主题定义了加粗的节点切换主题后文本样式丢失的问题 2024-01-09 16:08:28 +08:00
街角小林
d8fdc37684 Fix:修复渐变色背景的节点富文本编辑时编辑框没有应用渐变的问题 2024-01-05 15:28:55 +08:00
街角小林
b52497b3f6 Fix:修复一些情况下,节点显示时的文本区域宽度和编辑时的宽度不一致导致的文本换行不一致的问题 2024-01-05 15:16:38 +08:00
街角小林
3593990f9b 打包0.9.3 2024-01-05 14:51:48 +08:00
街角小林
eec99c1c43 Doc: update 2024-01-05 14:47:05 +08:00
街角小林
06a777eb64 Merge branch 'feature' into main 2024-01-05 13:51:20 +08:00
街角小林
e3cb7b0a6b Fix:修复导出图片时节点连线的箭头、关联线的箭头、渐变背景丢失的问题 2024-01-05 13:50:05 +08:00
街角小林
163ae6caae Feat:优化节点渐变背景逻辑 2024-01-05 12:19:52 +08:00
街角小林
78d677a00c Merge pull request #510 from lxr-cel/main
Feature: 节点渐变色背景功能实现
2024-01-05 11:06:34 +08:00
街角小林
3a1615f041 Merge pull request #508 from HappyYang233/feature_compatible_qiankun
兼容微前端框架子应用使用此框架时,new MouseEvent函数,view字段取得proxyWindow导致构造失败的问题
2024-01-05 09:16:18 +08:00
街角小林
166f2e0a73 Doc: update 2024-01-05 09:14:30 +08:00
lxr-cel
c62089adb9 节点渐变色web示例更新 2024-01-04 23:37:27 +08:00
lxr-cel
130acff77c 节点渐变色功能实现 2024-01-04 23:36:22 +08:00
lxr-cel
c4713097a0 节点渐变色web示例更新 2024-01-04 23:28:19 +08:00
lxr-cel
c50f278ec1 Merge branch 'wanglin2:main' into main 2024-01-04 22:33:31 +08:00
lxr-cel
9af630e578 节点背景渐变色实现 2024-01-04 22:21:53 +08:00
街角小林
541606b2eb Feat:新增节点数据更新明细事件 2024-01-04 09:39:44 +08:00
HappyYang233
0784eab6d1 兼容微前端框架子应用使用此框架时,new MouseEvent函数,view字段取得proxyWindow导致构造失败的问题 2024-01-03 19:26:10 +08:00
街角小林
1ad1538699 库不再导入katex的css文件,由使用方导入 2024-01-03 18:04:19 +08:00
街角小林
a488b436ee 打包库时自动更新版本号 2024-01-03 17:56:35 +08:00
街角小林
3a6a2544b2 Doc: update 2024-01-03 17:29:22 +08:00
wanglin2
1bb7e431fb Demo:代码优化 2023-12-29 22:04:56 +08:00
wanglin2
0cfa21d4e6 Feat:增加对节点非富文本编辑时的粘贴的拦截操作 2023-12-29 22:02:15 +08:00
街角小林
1409b07fb3 Feat:节点富文本编辑中,如果粘贴的是smm格式的数据,那么取出第一个节点的纯文本进行粘贴 2023-12-29 17:46:58 +08:00
街角小林
c0fb1e8db8 Demo:公式katex库的配置从simple-mind-map库中获取 2023-12-29 16:48:23 +08:00
街角小林
eb50b70214 Fix:修复Chrome低版本公式无法渲染的问题 2023-12-29 16:47:30 +08:00
wanglin2
794d3e9a53 Fix:修复safari浏览器节点存在图标时文字位置错位的问题 2023-12-28 21:36:45 +08:00
街角小林
f087b7102e Fix:优化节点存在超链接、备注时在firefox浏览器中导出图片的宽高不之前的问题 2023-12-28 18:49:31 +08:00
街角小林
ee97731e18 Feat:设置节点文本命令的第二个参数如果没有传递,会使用之前的值 2023-12-28 17:30:58 +08:00
街角小林
7196c37e9a Doc: update 2023-12-28 09:27:43 +08:00
街角小林
2a85a03889 Feat:导出pdf从jspdf库改为pdf-lib库 2023-12-28 09:27:34 +08:00
街角小林
8b99a6c191 Doc: update 2023-12-27 09:57:25 +08:00
220 changed files with 3891 additions and 29576 deletions

View File

@@ -2,12 +2,12 @@
[![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)
[![GitHub stars](https://img.shields.io/github/stars/wanglin2/mind-map)](https://github.com/wanglin2/mind-map/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/wanglin2/mind-map)](https://github.com/wanglin2/mind-map/network/members)
> 一个简单&强大的Web思维导图
> 中文名:思绪思维导图。一个简单&强大的 Web 思维导图
本项目包含两部分:
@@ -35,7 +35,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 +49,7 @@ npm i simple-mind-map
# 使用
提供一个宽高不为0的容器元素:
提供一个宽高不为 0 的容器元素:
```html
<div id="mindMapContainer"></div>
@@ -70,13 +70,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: [],
},
});
```
@@ -88,6 +88,8 @@ const mindMap = new MindMap({
[MIT](./LICENSE)
保留`mind-map`版权声明的情况下可随意商用。
# 微信交流群
群聊人数较多,无法通过二维码入群,可以微信添加`wanglinguanfang`拉你入群。
@@ -242,4 +244,32 @@ const mindMap = new MindMap({
<img src="./web/src/assets/avatar/继龙.jpg" 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/default.png" 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>
<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>
<span>
<img src="./web/src/assets/avatar/慕智打印-兰兰.jpg" style="width: 50px;height: 50px;" />
<span>慕智打印-兰兰</span>
</span>
</p>

File diff suppressed because one or more lines are too long

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

Binary file not shown.

BIN
dist/img/classic6.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
dist/img/classic7.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

BIN
dist/img/国发.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
dist/img/慕智打印-兰兰.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

BIN
dist/img/手绘风格.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

BIN
dist/img/欣.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
dist/img/汪津合.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 KiB

2
dist/js/app.js vendored

File diff suppressed because one or more lines are too long

1
dist/js/chunk-02258ed0.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
dist/js/chunk-1c3bec15.js vendored Normal file

File diff suppressed because one or more lines are too long

83
dist/js/chunk-1fafd80f.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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

View File

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
dist/js/chunk-792bedf8.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/js/chunk-9d289278.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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