Doc: update

This commit is contained in:
街角小林 2024-07-25 18:33:36 +08:00
parent 45d2da1337
commit d735be1204
4 changed files with 4 additions and 4 deletions

View File

@ -225,7 +225,7 @@ The browser uses API [window.showOpenFilePicker](https://developer.mozilla.org/z
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`
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.2.0`
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:

View File

@ -148,7 +148,7 @@ module. If you need it, you can try using other libraries to parse <code>xml</co
<h3>5.Import simple-mind-map error message, the error message is as follows:</h3>
<img src="../../../../assets/img/docs/错误.jpg" style="width: 850px" />
<p>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:</p>
<p>1.Manually reduce the version of the '@svgdotjs/svg.js' library. You can manually install the lower version in your project, such as: <code>npm i @svgdotjs/svg.js@3.0.16</code></p>
<p>1.Manually reduce the version of the '@svgdotjs/svg.js' library. You can manually install the lower version in your project, such as: <code>npm i @svgdotjs/svg.js@3.2.0</code></p>
<p>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:</p>
<p><code>@babel/plugin-proposal-nullish-coalescing-operator</code><code>@babel/plugin-proposal-optional-chaining</code></p>

View File

@ -209,7 +209,7 @@ resolve: { alias: { stream: "stream-browserify" } }
这是因为你的构建环境不支持该js语法该语法出自`@svgdotjs/svg.js`库,解决方法如下:
1.手动降低`@svgdotjs/svg.js`库的版本,你可以在你的项目中手动安装低版本,比如:`npm i @svgdotjs/svg.js@3.0.16`
1.手动降低`@svgdotjs/svg.js`库的版本,你可以在你的项目中手动安装低版本,比如:`npm i @svgdotjs/svg.js@3.2.0`
2.不降低版本的话,可以通过修改你的构建工具的相关配置,修改`babel`的配置,让它编译一下`node_modules`中的`simple-mind-map`库,或`@svgdotjs/svg.js`库,如果用的是`vue-cli`或`vite`,它们也直接提供了相关配置。另外需要安装编译该语法的`babel`插件,并且配置到`babel`的配置文件中:

View File

@ -131,7 +131,7 @@ npm run build
<h3>5.引入simple-mind-map报错报错信息如下</h3>
<img src="../../../../assets/img/docs/错误.jpg" style="width: 850px" />
<p>这是因为你的构建环境不支持该js语法该语法出自<code>@svgdotjs/svg.js</code>解决方法如下</p>
<p>1.手动降低<code>@svgdotjs/svg.js</code>库的版本你可以在你的项目中手动安装低版本比如<code>npm i @svgdotjs/svg.js@3.0.16</code></p>
<p>1.手动降低<code>@svgdotjs/svg.js</code>库的版本你可以在你的项目中手动安装低版本比如<code>npm i @svgdotjs/svg.js@3.2.0</code></p>
<p>2.不降低版本的话可以通过修改你的构建工具的相关配置修改<code>babel</code>的配置让它编译一下<code>node_modules</code>中的<code>simple-mind-map</code><code>@svgdotjs/svg.js</code>如果用的是<code>vue-cli</code><code>vite</code>它们也直接提供了相关配置另外需要安装编译该语法的<code>babel</code>插件并且配置到<code>babel</code>的配置文件中</p>
<p><code>@babel/plugin-proposal-nullish-coalescing-operator</code><code>@babel/plugin-proposal-optional-chaining</code></p>