文档新增常见错误解决方案

This commit is contained in:
wanglin2 2023-01-11 09:21:50 +08:00
parent 4f5f9543f7
commit 1c7edf47e3
2 changed files with 8 additions and 0 deletions

View File

@ -152,6 +152,10 @@ and if you do not need to parse the `xmind` file, you can remove the `xmind`
module. If you need it, you can try using other libraries to parse `xml` to
`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.js` is too high. You can manually reduce it to the version of `3.0.16`.
# API
## Instantiating

View File

@ -129,6 +129,10 @@ import MindMap from "simple-mind-map/dist/simpleMindMap.umd.min"
如果需要二次开发,也就是必须要使用未打包代码的话,如果你不需要解析`xmind`文件的话,可以去除`xmind`模块,如果需要的话那么可以尝试换成其他的解析`xml`为`json`的库。
## 2.报错`Getting bbox of element "text" is not possible: TypeError: Cannot read properties of undefined (reading 'apply')`
原因为安装的`@svgdotjs/svg.js`版本太高,手动降到`3.0.16`版本即可。
# API
## 实例化