diff --git a/README.md b/README.md
index 6de6545d..317db5ad 100644
--- a/README.md
+++ b/README.md
@@ -111,7 +111,7 @@ const mindMap = new MindMap({
# 关于定制
-如果你有个性化的商用定制需求,可以联系我们,我们提供付费开发服务。
+如果你有个性化的商用定制需求,可以联系我们,我们提供付费开发服务,无论前端、后端、还是部署,都可以帮你一站式搞定。
# 请作者喝杯咖啡
@@ -401,4 +401,12 @@ const mindMap = new MindMap({
Kyle
+
+
+ lsytyrt
+
+
+
+ 秀树因馨雨
+
Kyle
+lsytyrt
+秀树因馨雨
+json、png、svg、pdf、markdown、xmind、txt, support import from json、xmind、markdownjson、png、svg、pdf、markdown、xmind、txt, support import from json、xmind、markdownThe official provides the following plugins, which can be introduced as needed (a certain function may not be effective because you did not introduce the corresponding plugin). Please refer to the documentation for specific usage methods:
@@ -39,16 +39,16 @@ frameworks such as Vue and React, or without a framework.This is an online mind map built using the
simple-mind-maplibrary and based onVue2.xandElementUI. Features include:-
@@ -382,6 +382,14 @@ full screen, support mini map- +
- images, icons, hyperlinks, notes, tags, and summaries
-- +
- outline, theme selection, and structure selection
-- +
- storage by default, but it also supports creating, opening, and editing local files on the computer directly
-- +
- and organizing layout
-- +
- between edit and read-only modes, zooming in and out, and switching to full screen, support mini map
![]()
Kyle
++++
lsytyrt
++diff --git a/web/src/pages/Doc/en/start/index.md b/web/src/pages/Doc/en/start/index.md index 546d377a..694abc61 100644 --- a/web/src/pages/Doc/en/start/index.md +++ b/web/src/pages/Doc/en/start/index.md @@ -209,3 +209,15 @@ Different packaging tools may have different specific configurations, with the p ### 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. The browser uses API [window.showOpenFilePicker](https://developer.mozilla.org/zh-CN/docs/Web/API/Window/showOpenFilePicker) 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. + +### 5.Import simple-mind-map error message, the error message is as follows: + ++
秀树因馨雨
++ +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: + +1.Manually reduce the version of the '@svgdotjs/svg.js' library. You can manually install the lower version in your project, such as: `npm i @svgdotjs/svg.js@3.0.16` + +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: + +`@babel/plugin-proposal-nullish-coalescing-operator`、`@babel/plugin-proposal-optional-chaining`。 \ No newline at end of file diff --git a/web/src/pages/Doc/en/start/index.vue b/web/src/pages/Doc/en/start/index.vue index db15852e..85fadc3a 100644 --- a/web/src/pages/Doc/en/start/index.vue +++ b/web/src/pages/Doc/en/start/index.vue @@ -1,146 +1,6 @@
-diff --git a/web/src/pages/Doc/zh/introduction/index.md b/web/src/pages/Doc/zh/introduction/index.md index 9f6fe83d..e8703e81 100644 --- a/web/src/pages/Doc/zh/introduction/index.md +++ b/web/src/pages/Doc/zh/introduction/index.md @@ -424,4 +424,12 @@Start
-Installation
---Things to note before version 0.2.0:
--npm i simple-mind-map --
0.2.0Notes for previous versions:--Note: This project is directly published in source code form and has not been -packaged. If compilation fails, a Vue CLI-created project can add the -following configuration to the vue.config.js file to allow babel-loader to -compile this dependency:
--module.exports = { - transpileDependencies: ["simple-mind-map"], -}; -Other projects should modify the packaging configuration as needed.
-Usage
---The
-webdirectory of this repository provides a complete project based onVue2. If you encounter any doubts about using it, you can refer to the implementation of this project.--To learn about its use in other frameworks, you can refer to the following unofficial implementations:
-1.https://github.com/huangyuanyin/hyy-vue3-mindMap: A mind map based on Vue3.2+ElementPlus.
-Firstly, provide a container element with a width and height not equal to 0:
--<div id="mindMapContainer"></div> -Also, set the
-CSSstyle again:-#mindMapContainer * { - margin: 0; - padding: 0; -} -Then introduce the
-simple-mind-maplibrary and create an instance:-import MindMap from "simple-mind-map"; - -const mindMap = new MindMap({ - el: document.getElementById('mindMapContainer'), - data: { - "data": { - "text": "Root Node" - }, - "children": [] - } -}); -This will result in a mind map.
-If you want to implement a complete mind map, you usually need to develop some UI interfaces to achieve more functions through the interfaces provided by the
-simple-mind-maplibrary.-
simple-mind-mapsupports rich configurations, events, commands, and some additional plugin extensions. Read the subsequent documentation to learn more.The non-packaged 'ES' module is introduced by default, and only contains core functions, not unregistered plugin content, which can effectively reduce the size. However, you need to configure the
-babelcompilationsimple mind-mapin your project to prevent some newerjssyntax some browsers not supporting it.If you don't want to load all plugins from the beginning and want to load and register plugins asynchronously after instantiation, you can do this:
--import('simple-mind-map/src/plugins/Export.js').then(res => { - mindMap.addPlugin(res.default) -}) -If you need a file in the format of
-umdmodule, such asCDNin the browser, Then you can find thesimpleMindMap.umd.min.jsfile andsimpleMindMap.cssfile in the/simple-mind-map/dist/directory, copy it to your project, and then import it into the page:-<link rel="stylesheet" href="simpleMindMap.css"> -<script scr="simpleMindMap.umd.min.js"></script> -A global variable
-window.simpleMindMapwill be created. you can getMindMapconstructor bywindow.simpleMindMap.default, for more detail info you can logwindow.simpleMindMap.The disadvantage of this method is that it will contain all the content, including the plugins you have not registered, so the overall volume will be relatively large.
-(v0.5.4+)If you want to use the
-ESmodule directly on the browser side, you can find thesimpleMindMap.esm.jsandsimpleMindMap.esm.cssfiles in the/simple-mind-map/dist/directory.Online CDN services can also be used, such as:
--https://unpkg.com/browse/simple-mind-map@0.9.2/dist/ -You can find all the packaged files for a certain version.
-Development
-If you only use library, you don't need to read this section.
-Local Development
--git clone https://github.com/wanglin2/mind-map.git -cd mind-map -cd simple-mind-map -npm i -npm link -cd .. -cd web -npm i -npm link simple-mind-map -npm run serve ---If there is an installation dependency error, you can try adjusting the node version. The author is using version 14. x.
-Packaging the Library
-Since version
-0.2.0, we have added support for packaging the core library -simple-mind-map. This uses the same packaging tool as the sample project web.-cd web -npm run buildLibrary -The packaging entry is
-simple-mind-map/full.js, which will introduce all plugins by default. If you don't need all plugins, you can modify the file to only introduce the plugins you need, which can reduce the size of the packaged file.The
-package.jsonfile in thesimple-mind-maplibrary provides two export -fields:-{ - "module": "index.js", - "main": "./dist/simpleMindMap.umd.min.js" -} -Environments that support the
-modulefield will useindex.jsas the entry -point, otherwise the packedsimpleMindMap.umd.min.jswill be used as the entry -point.Generate TypeScript type files
--cd simple-mind-map -npm run types -You can obtain the type files in the 'simple-mind-map/types/' directory.
-Compile the doc
--cd web -npm run buildDoc -Packaging the Demo
--cd web -npm run build -The
-index.htmlfile will be automatically moved to the root directory.Problems
-Error when using in Vite, indicating xml-js dependency error
-Solution: use the following import method:
--import MindMap from "simple-mind-map/dist/simpleMindMap.umd.min"; -The
-simple-mind-mappackage provides the unpacked entry fieldmodule, and -thexml-jspackage dependency needs to import the package in thenode-environment. Therefore, it cannot be obtained inViteand 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.If you need to do further development, that is, you must use the unpacked code, -and if you do not need to parse the
-xmindfile, you can remove thexmind-module. If you need it, you can try using other libraries to parsexmlto -json.Error
-Getting bbox of element "text" is not possible: TypeError: Cannot read properties of undefined (reading 'apply')The reason is that the installed version of
-@svgdotjs/svg.jsis too high. You can manually reduce it to the version of3.0.16.TypeError: Cannot read properties of undefined (reading 'prototype') at sax.js:222:46
-The following configurations can be added to the packaging configuration file:
--resolve: { alias: { stream: "stream-browserify" } } -Different packaging tools may have different specific configurations, with the principle of excluding 'stream' dependencies.
-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.
-The browser uses API window.showOpenFilePicker 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.
- +![]()
Kyle
++++
lsytyrt
++diff --git a/web/src/pages/Doc/zh/introduction/index.vue b/web/src/pages/Doc/zh/introduction/index.vue index a25f78c7..8445ee00 100644 --- a/web/src/pages/Doc/zh/introduction/index.vue +++ b/web/src/pages/Doc/zh/introduction/index.vue @@ -8,18 +8,18 @@+
秀树因馨雨
+
json、png、svg、pdf、markdown、xmind、txt,支持从json、xmind、markdown导入json、png、svg、pdf、markdown、xmind、txt,支持从json、xmind、markdown导入官方提供了如下插件,可根据需求按需引入(某个功能不生效大概率是因为你没有引入对应的插件),具体使用方式请查看文档:
@@ -37,11 +37,11 @@2.
web使用
simple-mind-map库,基于vue2.x、ElementUI搭建的在线思维导图。特性:- - - - - + + + + +
提供文档页面服务。
3.
@@ -375,6 +375,14 @@dist![]()
Kyle
++++
lsytyrt
++diff --git a/web/src/pages/Doc/zh/start/index.md b/web/src/pages/Doc/zh/start/index.md index 4694e19c..c89f9a85 100644 --- a/web/src/pages/Doc/zh/start/index.md +++ b/web/src/pages/Doc/zh/start/index.md @@ -192,4 +192,16 @@ resolve: { alias: { stream: "stream-browserify" } } ### 4.点击【新建】、【打开】、【另存为】按钮时提示浏览器不支持,或者非https协议。 -浏览器上操作电脑本地文件使用的是[window.showOpenFilePicker](https://developer.mozilla.org/zh-CN/docs/Web/API/Window/showOpenFilePicker)api,如果不支持,要么是浏览器不支持这个API,要么是因为页面非https协议,你可以按F12,或者在页面通过鼠标右键菜单中的【检查】打开浏览器控制台,在其中的【控制台】或【console】tab中输入`window.showOpenFilePicker`按回车,如果返回`undefined`则代表不支持,如果返回的不是这个,而页面依旧提示提示浏览器不支持,或者非https协议,那么可以提交issue,或者联系作者。 \ No newline at end of file +浏览器上操作电脑本地文件使用的是[window.showOpenFilePicker](https://developer.mozilla.org/zh-CN/docs/Web/API/Window/showOpenFilePicker)api,如果不支持,要么是浏览器不支持这个API,要么是因为页面非https协议,你可以按F12,或者在页面通过鼠标右键菜单中的【检查】打开浏览器控制台,在其中的【控制台】或【console】tab中输入`window.showOpenFilePicker`按回车,如果返回`undefined`则代表不支持,如果返回的不是这个,而页面依旧提示提示浏览器不支持,或者非https协议,那么可以提交issue,或者联系作者。 + +### 5.引入simple-mind-map报错,报错信息如下: + ++
秀树因馨雨
++ +这是因为你的构建环境不支持该js语法,该语法出自`@svgdotjs/svg.js`库,解决方法如下: + +1.手动降低`@svgdotjs/svg.js`库的版本,你可以在你的项目中手动安装低版本,比如:`npm i @svgdotjs/svg.js@3.0.16` + +2.不降低版本的话,可以通过修改你的构建工具的相关配置,修改`babel`的配置,让它编译一下`node_modules`中的`simple-mind-map`库,或`@svgdotjs/svg.js`库,如果用的是`vue-cli`或`vite`,它们也直接提供了相关配置。另外需要安装编译该语法的`babel`插件,并且配置到`babel`的配置文件中: + +`@babel/plugin-proposal-nullish-coalescing-operator`、`@babel/plugin-proposal-optional-chaining`。 \ No newline at end of file diff --git a/web/src/pages/Doc/zh/start/index.vue b/web/src/pages/Doc/zh/start/index.vue index 5a4b26ee..20022828 100644 --- a/web/src/pages/Doc/zh/start/index.vue +++ b/web/src/pages/Doc/zh/start/index.vue @@ -123,6 +123,12 @@ npm run build
不同的打包工具可能具体配置不一样,原理就是排除
stream依赖。4.点击【新建】、【打开】、【另存为】按钮时提示浏览器不支持,或者非https协议。
浏览器上操作电脑本地文件使用的是window.showOpenFilePickerapi,如果不支持,要么是浏览器不支持这个API,要么是因为页面非https协议,你可以按F12,或者在页面通过鼠标右键菜单中的【检查】打开浏览器控制台,在其中的【控制台】或【console】tab中输入
+window.showOpenFilePicker按回车,如果返回undefined则代表不支持,如果返回的不是这个,而页面依旧提示提示浏览器不支持,或者非https协议,那么可以提交issue,或者联系作者。5.引入simple-mind-map报错,报错信息如下:
++
这是因为你的构建环境不支持该js语法,该语法出自
+@svgdotjs/svg.js库,解决方法如下:1.手动降低
+@svgdotjs/svg.js库的版本,你可以在你的项目中手动安装低版本,比如:npm i @svgdotjs/svg.js@3.0.162.不降低版本的话,可以通过修改你的构建工具的相关配置,修改
+babel的配置,让它编译一下node_modules中的simple-mind-map库,或@svgdotjs/svg.js库,如果用的是vue-cli或vite,它们也直接提供了相关配置。另外需要安装编译该语法的babel插件,并且配置到babel的配置文件中:
@babel/plugin-proposal-nullish-coalescing-operator、@babel/plugin-proposal-optional-chaining。