Compare commits

...

81 Commits

Author SHA1 Message Date
街角小林
ff22a652d5 打包0.10.6 2024-08-15 18:31:18 +08:00
街角小林
d1ade8204b Doc: update 2024-08-15 18:22:51 +08:00
街角小林
2a84a3cf16 Demo:修复更改基础样式后切换主题,选择覆盖,再修改基础样式时之前覆盖的样式会恢复的问题 2024-08-15 16:39:56 +08:00
街角小林
721cae8139 Demo:修复激活节点时在缩放备注输入框中输入会输入到节点文本中的问题 2024-08-15 16:29:18 +08:00
街角小林
8f8662f2df Fix:修复处于回退操作中激活节点后无法前进的问题 2024-08-15 16:25:39 +08:00
街角小林
bc56f90595 Fix:修复一些小问题 2024-08-15 15:49:33 +08:00
街角小林
0d1b9dfff4 Feat:全选操作支持选中概要节点 2024-08-15 15:41:58 +08:00
街角小林
ccb2a260b6 Feat:鼠标框选支持选中概要节点 2024-08-15 15:30:56 +08:00
街角小林
2c8b96582a Feat:1.优化概要渲染,减少不必要的重新渲染;2.修复同时选中概要节点和其所属节点,设置节点样式后概要节点会失去激活状态的问题 2024-08-15 15:19:26 +08:00
街角小林
161d9dd715 Feat:新增节点备注图标点击事件 2024-08-14 18:35:27 +08:00
街角小林
1033447b9c Feat:搜索插件支持搜索概要节点 2024-08-14 17:48:23 +08:00
街角小林
1dbcb71ec5 Fix:修复GO_TARGET_NODE命令对概要节点支持不全的问题 2024-08-14 17:35:32 +08:00
街角小林
c0733dda35 update 2024-08-14 16:59:37 +08:00
街角小林
4c5b2e7af2 Demo:备注里的超链接改为新窗口打开 2024-08-14 16:50:53 +08:00
街角小林
322f7a3e2a Fix:修复富文本模式下切换主题,概要节点的文本样式没有跟随改变的问题 2024-08-14 16:42:26 +08:00
街角小林
766e0e5fae Doc: update 2024-08-14 16:33:43 +08:00
街角小林
4335cbb713 Feat:render类新增手动激活和取消激活多个节点的方法 2024-08-14 16:33:28 +08:00
街角小林
82473027da Demo:右键菜单新增设置节点编号功能 2024-08-14 09:41:33 +08:00
街角小林
68bf2d361c Feat:新增对编号插件的支持 2024-08-14 09:21:30 +08:00
街角小林
1620a013ba Feat:walk方法增加祖先列表回调参数 2024-08-13 10:57:01 +08:00
街角小林
13a1f989c3 Feat:实例销毁时删除文本编辑框的元素 2024-08-12 14:06:30 +08:00
街角小林
8bbbc082c7 Doc: update 2024-08-12 13:50:38 +08:00
街角小林
f15bf8a8dc Demo:支持设置关联线的样式,即实线或虚线 2024-08-12 13:36:42 +08:00
街角小林
3801dc3ec4 Feat:主题配置支持设置关联线的样式,即实线或虚线 2024-08-12 13:36:14 +08:00
街角小林
182cdf5153 Feat:不阻止mousedown、mousemove事件的默认行为 2024-08-12 10:58:17 +08:00
街角小林
1cd4705ad8 Feat:支持不显示展开收起按钮的实例化选项 2024-08-12 10:36:05 +08:00
街角小林
d82cedcbdd Fix:1.修复点击鼠标右键菜单时关联线插件报错的问题;2.修复点击画布无法取消激活关联线的问题; 2024-08-12 09:55:05 +08:00
街角小林
f9c271e11b Demo:支持鼠标选中备注浮层的内容 2024-08-12 09:27:45 +08:00
街角小林
a26d6bc7cf 打包Demo 2024-08-08 12:01:39 +08:00
街角小林
dc522cd0be Doc: update 2024-08-08 11:57:47 +08:00
街角小林
43969af14b Fix:修复只读模式下搜索节点的高亮不会消失的问题 2024-08-08 11:52:02 +08:00
街角小林
79ccd9892c Feat:RichText插件新增扩展字体列表的方法 2024-08-06 09:56:37 +08:00
街角小林
5fb35d656f 打包0.10.5 2024-08-02 10:04:20 +08:00
街角小林
cec1f59189 Doc: update 2024-08-02 09:46:17 +08:00
街角小林
a6a890362e Dmoe:修复大纲里点击节点进行拖拽会触发页面的文件拖拽蒙层的问题 2024-08-01 10:36:03 +08:00
街角小林
83b6d5793b Fix:修复画布尺寸调整后第一次触发渲染画布会发生跳动的问题 2024-07-31 10:53:56 +08:00
街角小林
9b40a7bedd Doc: update 2024-07-30 09:19:10 +08:00
街角小林
11f2078ee0 Demo:编辑本地文件时如果未保存关闭页面增加拦截提示 2024-07-29 17:20:21 +08:00
街角小林
4fb9bd5135 Demo:打开本地文件编辑的情况下不再将数据写入浏览器缓存 2024-07-29 17:00:39 +08:00
街角小林
cf56b5db24 Demo:节点下级数量大于100收起时显示省略号 2024-07-29 15:39:51 +08:00
街角小林
40ea595e62 Feat:移动节点或复制节点到收起的节点上自动展开该节点 2024-07-29 15:13:11 +08:00
街角小林
91a9d7b556 Doc: update 2024-07-29 09:54:50 +08:00
街角小林
0669e73a5b Feat:支持点击画布取消创建关联线 2024-07-29 09:49:05 +08:00
街角小林
fde6fc2583 Fix:修复开启性能模式后,演示插件无法正常工作的问题 2024-07-29 09:28:51 +08:00
街角小林
f92146a1f4 Fix:修复跨层级复制节点时,节点的富文本样式没有更新的问题 2024-07-26 17:05:09 +08:00
街角小林
38c6966d13 Feat:移动节点且节点层级发生了改变,设置过自定义富文本样式的节点不需要更新样式 2024-07-26 16:39:19 +08:00
街角小林
4894d9e6e6 Fix:修复开启性能模式后拖动滚动条报错的问题 2024-07-26 15:51:30 +08:00
街角小林
9a64094f14 打包0.10.4 2024-07-26 10:32:39 +08:00
街角小林
95fdb35f7b Fix:优化性能模式的懒加载 2024-07-26 10:15:54 +08:00
街角小林
497c2606df Feat:懒加载节点树时增加触发渲染开始和结束事件的派发 2024-07-26 09:38:22 +08:00
街角小林
d735be1204 Doc: update 2024-07-25 18:33:36 +08:00
街角小林
45d2da1337 update package.json 2024-07-25 18:32:04 +08:00
街角小林
194571d5fe Fix:修复在@svgdotjs/svg.js库版本为3.0.16时报错的问题 2024-07-25 18:05:22 +08:00
街角小林
418b24b039 Doc: update 2024-07-25 17:38:01 +08:00
街角小林
b32a8b5a85 Demo:基础配置里增加开启性能模式的开关 2024-07-25 16:41:21 +08:00
街角小林
2dee415a64 Feat:新增性能模式 2024-07-25 16:40:47 +08:00
街角小林
4e7d59b328 Fix:删除无用代码,修复鼠标悬浮节点上报错不显示展开收起按钮的问题 2024-07-24 17:13:49 +08:00
街角小林
9bde9ffaf3 Doc: update 2024-07-22 09:25:22 +08:00
街角小林
1b4ca19ad8 打包0.10.3 2024-07-19 14:22:00 +08:00
街角小林
eb72e0eed3 Doc: update 2024-07-19 14:11:23 +08:00
街角小林
6dea1ef9b2 Demo:支持配置外框内边距 2024-07-18 15:18:44 +08:00
街角小林
c6c1ef2117 Feat:新增设置外框内边距的实例化选项 2024-07-18 13:45:50 +08:00
街角小林
4423fd562b Demo:去除引入公式库样式的逻辑 2024-07-18 10:10:23 +08:00
街角小林
7b1ea5e354 Feat:1.支持自定义katex库渲染模式的实例化选项;2.公式插件会默认引入katex库的样式,增加自定义字体文件路径的实例化选项 2024-07-18 10:09:39 +08:00
街角小林
5192753816 Feat:如果开启了公式插件并且存在公式,那么导出svg时需要传入katex库的样式 2024-07-18 10:05:48 +08:00
街角小林
6382e8acd8 Doc: update 2024-07-16 16:47:29 +08:00
街角小林
e293039b3c Doc: update 2024-07-12 17:05:55 +08:00
街角小林
f819cbc5b1 Demo:修复对象类型的标签数据在标签弹窗里回显错误的问题 2024-07-12 15:18:48 +08:00
街角小林
44a883c473 Feat:复制、剪切、移动多个节点时,按其在节点上的顺序进行操作 2024-07-11 09:53:54 +08:00
街角小林
c1f600dc1f Fix:修复同时选中多个节点,可以不停插入概要的问题 2024-07-11 09:34:14 +08:00
街角小林
4777ab3e58 Demo:支持点击节点标签进行文本和颜色的修改 2024-07-09 15:57:46 +08:00
街角小林
12c6479c0d Feat:node_tag_click事件新增两个回调参数 2024-07-09 15:54:06 +08:00
街角小林
f79918ec6f Feat:1.支持定义标签样式;2.新增标签显示位置的实例化选项; 2024-07-09 14:11:18 +08:00
街角小林
ba9a6e501a Doc: update 2024-07-09 10:35:28 +08:00
街角小林
9b55d051dc Fix:修复编辑过节点文本后,再使用滚轮或快捷键缩放画布时上次被编辑的节点会进入编辑状态,以及思维导图快捷键会失效的问题 2024-07-08 16:52:53 +08:00
街角小林
159a4a202c Fix:修复customCreateNodeContent、createNodePrefixContent等方法里获取到的节点的isRoot和parent等值都为null的问题 2024-07-08 16:27:18 +08:00
街角小林
ac72c0c1dc Demo:恢复误删的文件 2024-07-05 10:57:06 +08:00
街角小林
f54f92c303 update 2024-07-04 17:32:00 +08:00
街角小林
c2dbfb41d5 打包0.10.2-fix.1 2024-07-03 12:11:59 +08:00
街角小林
5867649429 Fix:修复修改了外框的线条样式,激活后再取消激活,样式会变成默认的样式的问题 2024-07-03 12:00:44 +08:00
街角小林
de29ec59c5 打包Demo 2024-07-03 11:34:16 +08:00
248 changed files with 5455 additions and 635 deletions

View File

@@ -25,6 +25,8 @@ Github[releases](https://github.com/wanglin2/mind-map/releases)。百度云
> 客户端版本会落后于在线版本,尝试最新功能请优先使用在线版。
【云存储版本】如果你需要带后端的云存储版本,可以尝试我们开发的另一个项目[理想文档](https://github.com/wanglin2/lx-doc)。
# 特性
- [x] 插件化架构,除核心功能外,其他功能作为插件提供,按需使用,减小打包体积
@@ -35,7 +37,7 @@ Github[releases](https://github.com/wanglin2/mind-map/releases)。百度云
- [x] 支持画布拖动、缩放
- [x] 支持鼠标按键拖动选择和 Ctrl+左键两种多选节点方式
- [x] 支持导出为`json``png``svg``pdf``markdown``xmind``txt`,支持从`json``xmind``markdown`导入
- [x] 支持快捷键、前进后退、关联线、搜索替换、小地图、水印、滚动条、手绘风格、彩虹线条
- [x] 支持快捷键、前进后退、关联线、搜索替换、小地图、水印、滚动条、手绘风格、彩虹线条、标记、外框
- [x] 提供丰富的配置,满足各种场景各种使用习惯
- [x] 支持协同编辑
- [x] 支持演示模式
@@ -101,7 +103,9 @@ const mindMap = new MindMap({
# 微信交流群
群聊人数较多,无法通过二维码入群,可以微信添加`wanglinguanfang`拉你入群。思维导图相关问题皆可在群里提问,不必私聊作者。
一群已满,可以扫描如下二维码进入二群,如已过期,可以微信添加`wanglinguanfang`拉你入群。思维导图相关问题皆可在群里提问,不必私聊作者。
<img src="./qrcode.jpg" style="width: 300px" />
# star
@@ -413,4 +417,40 @@ const mindMap = new MindMap({
<img src="./web/src/assets/avatar/buddy.jpg" style="width: 50px;height: 50px;" />
<span>buddy</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/Tobin.jpg" style="width: 50px;height: 50px;" />
<span>Tobin</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>
<span>
<img src="./web/src/assets/avatar/ccccs.jpg" style="width: 50px;height: 50px;" />
<span>ccccs</span>
</span>
<span>
<img src="./web/src/assets/avatar/。.png" style="width: 50px;height: 50px;" />
<span>。</span>
</span>
<span>
<img src="./web/src/assets/avatar/Jeffrey.jpg" style="width: 50px;height: 50px;" />
<span>Jeffrey</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

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
dist/img/Jeffrey.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

BIN
dist/img/Tobin.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
dist/img/ccccs.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
dist/img/qrcode.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
dist/img/。.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
dist/img/夏虫不语冰.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
dist/img/张文建.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
dist/img/晴空.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
dist/img/编号1.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
dist/img/编号2.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

BIN
dist/img/编号3.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

2
dist/js/app.js vendored

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-0e53cbc6.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/js/chunk-1171703b.js vendored Normal file
View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1171703b"],{"8cc7":function(e,o,t){"use strict";t.r(o);var s=function(){var e=this;e._self._c;return e._m(0)},i=[function(){var e=this,o=e._self._c;return o("div",[o("h1",[e._v("Questions")]),o("h2",[e._v("1.Error when using in Vite, indicating xml-js dependency error")]),o("p",[e._v("Solution: use the following import method:")]),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/dist/simpleMindMap.umd.min"')]),e._v(";\n")])]),o("p",[e._v("The "),o("code",[e._v("simple-mind-map")]),e._v(" package provides the unpacked entry field "),o("code",[e._v("module")]),e._v(", and the "),o("code",[e._v("xml-js")]),e._v(" package dependency needs to import the package in the "),o("code",[e._v("node")]),e._v(" environment. Therefore, it cannot be obtained in "),o("code",[e._v("Vite")]),e._v(" and an error will be reported. Therefore, specify the import of the packed entry, and all relevant packages are packed into the product, so there will be no error.")]),o("p",[e._v("If you need to do further development, that is, you must use the unpacked code, and if you do not need to parse the "),o("code",[e._v("xmind")]),e._v(" file, you can remove the "),o("code",[e._v("xmind")]),e._v(" module. If you need it, you can try using other libraries to parse "),o("code",[e._v("xml")]),e._v(" to "),o("code",[e._v("json")]),e._v(".")]),o("h2",[e._v("2.Error "),o("code",[e._v("Getting bbox of element \"text\" is not possible: TypeError: Cannot read properties of undefined (reading 'apply')")])]),o("p",[e._v("The reason is that the installed version of "),o("code",[e._v("@svgdotjs/svg.js")]),e._v(" is too high. You can manually reduce it to the version of "),o("code",[e._v("3.0.16")]),e._v(".")]),o("h2",[e._v("3.TypeError: Cannot read properties of undefined (reading 'prototype') at sax.js:222:46")]),o("p",[e._v("The following configurations can be added to the packaging configuration file:")]),o("pre",{staticClass:"hljs"},[o("code",[e._v("resolve: { "),o("span",{staticClass:"hljs-attr"},[e._v("alias")]),e._v(": { "),o("span",{staticClass:"hljs-attr"},[e._v("stream")]),e._v(": "),o("span",{staticClass:"hljs-string"},[e._v('"stream-browserify"')]),e._v(" } }\n")])]),o("p",[e._v("Different packaging tools may have different specific configurations, with the principle of excluding 'stream' dependencies.")]),o("h2",[e._v("4.When clicking the [New], [Open], or [Save As] buttons, it will prompt that the browser does not support it or is not using the HTTPS protocol.")]),o("p",[e._v("The browser uses API "),o("a",{attrs:{href:"https://developer.mozilla.org/zh-CN/docs/Web/API/Window/showOpenFilePicker"}},[e._v("window.showOpenFilePicker")]),e._v(" to operate local files on the computer. If it is not supported, either the browser does not support this API or the page is not using the HTTPS protocol, You can press F12, or open the browser console through the right-click menu on the page and enter 'window.showOpenFilePicker' in the 'Console' tab. If it returns 'undefined', it means it is not supported. If it does not return this message and the page still prompts that the browser does not support it or is not using the HTTPS protocol, you can submit an issue or contact the author.")]),o("h2",[e._v("5.Import simple-mind-map error message, the error message is as follows:")]),o("img",{staticStyle:{width:"850px"},attrs:{src:t("bff3")}}),o("p",[e._v("This is because your build environment does not support this JavaScript syntax, which comes from the '@svgdotjs/svg.js' library. The solution is as follows:")]),o("p",[e._v("1.Manually reduce the version of the '@svgdotjs/svg.js' library. You can manually install the lower version in your project, such as: "),o("code",[e._v("npm i @svgdotjs/svg.js@3.2.0")])]),o("p",[e._v("2.If you don't reduce the version, you can modify the relevant configuration of your build tool, modify the configuration of 'babel', and have it compile the 'simple-mind-map' library in 'node.modules' or the '@svgdotjs/svg.js' library. If you are using 'vue-cli' or 'vite', they also provide the relevant configuration directly. In addition, it is necessary to install the 'babel' plugin that compiles this syntax and configure it in the 'babel' configuration file:")]),o("p",[o("code",[e._v("@babel/plugin-proposal-nullish-coalescing-operator")]),e._v("、"),o("code",[e._v("@babel/plugin-proposal-optional-chaining")]),e._v("。")])])}],n={},r=n,a=t("2877"),l=Object(a["a"])(r,s,i,!1,null,null,null);o["default"]=l.exports},bff3:function(e,o,t){e.exports=t.p+"img/错误.jpg"}}]);

1
dist/js/chunk-15396d69.js vendored Normal file
View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-15396d69"],{"57f5":function(s,e,v){"use strict";v.r(e);var o=function(){var s=this;s._self._c;return s._m(0)},_=[function(){var s=this,e=s._self._c;return e("div",[e("h1",[s._v("常见问题")]),e("h2",[s._v("1.在Vite中使用报错提示xml-js依赖出错")]),e("p",[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/dist/simpleMindMap.umd.min"')]),s._v("\n")])]),e("p",[e("code",[s._v("simple-mind-map")]),s._v("包提供未打包的入口字段"),e("code",[s._v("module")]),s._v(",依赖的"),e("code",[s._v("xml-js")]),s._v("包需要引入"),e("code",[s._v("node")]),s._v("环境下的包,所以在"),e("code",[s._v("Vite")]),s._v("中获取不到会报错,所以指定引入打包后的入口,相关包都已打包进产物,所以不会报错。")]),e("p",[s._v("如果需要二次开发,也就是必须要使用未打包代码的话,如果你不需要解析"),e("code",[s._v("xmind")]),s._v("文件的话,可以去除"),e("code",[s._v("xmind")]),s._v("模块,如果需要的话那么可以尝试换成其他的解析"),e("code",[s._v("xml")]),s._v("为"),e("code",[s._v("json")]),s._v("的库。")]),e("h2",[s._v("2.报错"),e("code",[s._v("Getting bbox of element \"text\" is not possible: TypeError: Cannot read properties of undefined (reading 'apply')")])]),e("p",[s._v("原因为安装的"),e("code",[s._v("@svgdotjs/svg.js")]),s._v("版本太高,手动降到"),e("code",[s._v("3.0.16")]),s._v("版本即可。")]),e("h2",[s._v("3.TypeError: Cannot read properties of undefined (reading 'prototype') at sax.js:222:46")]),e("p",[s._v("可以在打包配置文件中增加如下配置:")]),e("pre",{staticClass:"hljs"},[e("code",[s._v("resolve: { "),e("span",{staticClass:"hljs-attr"},[s._v("alias")]),s._v(": { "),e("span",{staticClass:"hljs-attr"},[s._v("stream")]),s._v(": "),e("span",{staticClass:"hljs-string"},[s._v('"stream-browserify"')]),s._v(" } }\n")])]),e("p",[s._v("不同的打包工具可能具体配置不一样,原理就是排除"),e("code",[s._v("stream")]),s._v("依赖。")]),e("h2",[s._v("4.点击【新建】、【打开】、【另存为】按钮时提示浏览器不支持或者非https协议。")]),e("p",[s._v("浏览器上操作电脑本地文件使用的是"),e("a",{attrs:{href:"https://developer.mozilla.org/zh-CN/docs/Web/API/Window/showOpenFilePicker"}},[s._v("window.showOpenFilePicker")]),s._v("api如果不支持要么是浏览器不支持这个API要么是因为页面非https协议你可以按F12或者在页面通过鼠标右键菜单中的【检查】打开浏览器控制台在其中的【控制台】或【console】tab中输入"),e("code",[s._v("window.showOpenFilePicker")]),s._v("按回车,如果返回"),e("code",[s._v("undefined")]),s._v("则代表不支持如果返回的不是这个而页面依旧提示提示浏览器不支持或者非https协议那么可以提交issue或者联系作者。")]),e("h2",[s._v("5.引入simple-mind-map报错报错信息如下")]),e("img",{staticStyle:{width:"850px"},attrs:{src:v("bff3")}}),e("p",[s._v("这是因为你的构建环境不支持该js语法该语法出自"),e("code",[s._v("@svgdotjs/svg.js")]),s._v("库,解决方法如下:")]),e("p",[s._v("1.手动降低"),e("code",[s._v("@svgdotjs/svg.js")]),s._v("库的版本,你可以在你的项目中手动安装低版本,比如:"),e("code",[s._v("npm i @svgdotjs/svg.js@3.2.0")])]),e("p",[s._v("2.不降低版本的话,可以通过修改你的构建工具的相关配置,修改"),e("code",[s._v("babel")]),s._v("的配置,让它编译一下"),e("code",[s._v("node_modules")]),s._v("中的"),e("code",[s._v("simple-mind-map")]),s._v("库,或"),e("code",[s._v("@svgdotjs/svg.js")]),s._v("库,如果用的是"),e("code",[s._v("vue-cli")]),s._v("或"),e("code",[s._v("vite")]),s._v(",它们也直接提供了相关配置。另外需要安装编译该语法的"),e("code",[s._v("babel")]),s._v("插件,并且配置到"),e("code",[s._v("babel")]),s._v("的配置文件中:")]),e("p",[e("code",[s._v("@babel/plugin-proposal-nullish-coalescing-operator")]),s._v("、"),e("code",[s._v("@babel/plugin-proposal-optional-chaining")]),s._v("。")])])}],t={},i=t,d=v("2877"),n=Object(d["a"])(i,o,_,!1,null,null,null);e["default"]=n.exports},bff3:function(s,e,v){s.exports=v.p+"img/错误.jpg"}}]);

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

1
dist/js/chunk-2d0e2326.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

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

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0f09d5"],{"9cb7":function(s,e,n){"use strict";n.r(e);var a=function(){var s=this;s._self._c;return s._m(0)},d=[function(){var s=this,e=s._self._c;return e("div",[e("h1",[s._v("如何通过代码激活节点")]),e("p",[s._v("默认可以通过鼠标单击节点来激活单个节点鼠标拖拽或按住Ctrl键单击进行激活多个节点那么如何通过代码来激活单个或多个节点达到和鼠标操作一样的效果呢请往下看。")]),e("h2",[s._v("激活单个节点")]),e("p",[s._v("如果已经获取到节点实例,那么直接调用该节点实例的"),e("code",[s._v("active()")]),s._v("方法即可:")]),e("pre",{staticClass:"hljs"},[e("code",[s._v("node.active()\n")])]),e("p",[s._v("如果只知道节点"),e("code",[s._v("uid")]),s._v(",那么可以先获取节点实例,再调激活的方法:")]),e("pre",{staticClass:"hljs"},[e("code",[e("span",{staticClass:"hljs-keyword"},[s._v("const")]),s._v(" node = mindMap.renderer.findNodeByUid("),e("span",{staticClass:"hljs-string"},[s._v("'uid'")]),s._v(")\nnode.active()\n")])]),e("h2",[s._v("激活多个节点")]),e("p",[s._v("如果要激活多个节点,在"),e("code",[s._v("v0.10.6")]),s._v("版本以前需要这么做:")]),e("pre",{staticClass:"hljs"},[e("code",[s._v(";[id1, id2, id3].forEach("),e("span",{staticClass:"hljs-function"},[e("span",{staticClass:"hljs-params"},[s._v("id")]),s._v(" =>")]),s._v(" {\n "),e("span",{staticClass:"hljs-comment"},[s._v("// 获取节点实例")]),s._v("\n "),e("span",{staticClass:"hljs-keyword"},[s._v("const")]),s._v(" node = mindMap.renderer.findNodeByUid(id)\n "),e("span",{staticClass:"hljs-comment"},[s._v("// 手动派发节点激活前事件")]),s._v("\n mindMap.emit(\n "),e("span",{staticClass:"hljs-string"},[s._v("'before_node_active'")]),s._v(",\n node,\n mindMap.renderer.activeNodeList\n )\n "),e("span",{staticClass:"hljs-comment"},[s._v("// 激活节点,并将该节点添加到激活节点列表里")]),s._v("\n mindMap.renderer.addNodeToActiveList(node, "),e("span",{staticClass:"hljs-literal"},[s._v("true")]),s._v(")\n "),e("span",{staticClass:"hljs-comment"},[s._v("// 手动派发节点激活事件")]),s._v("\n mindMap.renderer.emitNodeActiveEvent(node)\n})\n")])]),e("p",[s._v("在"),e("code",[s._v("v0.10.6+")]),s._v("版本,"),e("code",[s._v("render")]),s._v("实例新增了激活多个节点的方法,所以可以直接使用:")]),e("pre",{staticClass:"hljs"},[e("code",[e("span",{staticClass:"hljs-keyword"},[s._v("const")]),s._v(" nodeList = [id1, id2, id3, id4].map("),e("span",{staticClass:"hljs-function"},[e("span",{staticClass:"hljs-params"},[s._v("id")]),s._v(" =>")]),s._v(" {\n "),e("span",{staticClass:"hljs-keyword"},[s._v("return")]),s._v(" mindMap.renderer.findNodeByUid(id)\n})\nmindMap.renderer.activeMultiNode(nodeList)\n")])]),e("h2",[s._v("取消激活所有节点")]),e("p",[s._v("取消激活所有节点可以直接调用"),e("code",[s._v("render")]),s._v("实例的方法:")]),e("pre",{staticClass:"hljs"},[e("code",[s._v("mindMap.renderer.clearActiveNode()\n")])]),e("p",[s._v("这个方法不会派发"),e("code",[s._v("before_node_active")]),s._v("事件,所以如果需要你可以自己手动派发一下。")]),e("h2",[s._v("取消激活指定节点")]),e("p",[s._v("要取消激活指定的节点,在"),e("code",[s._v("v0.10.6")]),s._v("版本以前需要这么做:")]),e("pre",{staticClass:"hljs"},[e("code",[s._v(";[id1, id2, id3, id4].forEach("),e("span",{staticClass:"hljs-function"},[e("span",{staticClass:"hljs-params"},[s._v("id")]),s._v(" =>")]),s._v(" {\n "),e("span",{staticClass:"hljs-keyword"},[s._v("const")]),s._v(" node = mindMap.renderer.findNodeByUid(id)\n mindMap.renderer.removeNodeFromActiveList(node)\n mindMap.renderer.emitNodeActiveEvent("),e("span",{staticClass:"hljs-literal"},[s._v("null")]),s._v(")\n})\n")])]),e("p",[s._v("在"),e("code",[s._v("v0.10.6+")]),s._v("版本,"),e("code",[s._v("render")]),s._v("实例新增了取消激活多个节点的方法,所以可以直接使用:")]),e("pre",{staticClass:"hljs"},[e("code",[e("span",{staticClass:"hljs-keyword"},[s._v("const")]),s._v(" nodeList = [id1, id2, id3, id4].map("),e("span",{staticClass:"hljs-function"},[e("span",{staticClass:"hljs-params"},[s._v("id")]),s._v(" =>")]),s._v(" {\n "),e("span",{staticClass:"hljs-keyword"},[s._v("return")]),s._v(" mindMap.renderer.findNodeByUid(id)\n})\nmindMap.renderer.cancelActiveMultiNode(nodeList)\n")])])])}],i={},t=i,v=n("2877"),r=Object(v["a"])(t,a,d,!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

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