mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-22 10:57:40 +08:00
58 lines
1.7 KiB
Markdown
58 lines
1.7 KiB
Markdown
<h1 align="center">Simple mind map</h1>
|
||
|
||
[](https://www.npmjs.com/package/simple-mind-map)
|
||

|
||
[](https://github.com/wanglin2/mind-map/stargazers)
|
||
[](https://github.com/wanglin2/mind-map/issues)
|
||
[](https://github.com/wanglin2/mind-map/network/members)
|
||

|
||
|
||
> 一个简单&强大的Web思维导图库
|
||
|
||
Demo:[https://wanglin2.github.io/mind-map/](https://wanglin2.github.io/mind-map/)
|
||
|
||
文档:[https://wanglin2.github.io/mind-map/#/doc/zh/](https://wanglin2.github.io/mind-map/#/doc/zh/)
|
||
|
||
# 特性
|
||
|
||
- [x] 支持逻辑结构图、思维导图、组织结构图、目录组织图四种结构
|
||
- [x] 内置多种主题,允许高度自定义样式,支持注册新主题
|
||
- [x] 支持快捷键
|
||
- [x] 节点内容支持图片、图标、超链接、备注、标签、概要
|
||
- [x] 支持前进后退
|
||
- [x] 支持拖动、缩放
|
||
- [x] 支持右键和Ctrl+左键两种多选方式
|
||
- [x] 支持节点自由拖拽、拖拽调整
|
||
- [x] 支持多种节点形状
|
||
- [x] 支持导出为`json`、`png`、`svg`、`pdf`,支持从`json`、`xmind`导入
|
||
- [x] 支持小地图
|
||
|
||
# 安装
|
||
|
||
```bash
|
||
npm i simple-mind-map
|
||
```
|
||
|
||
# 使用
|
||
|
||
```html
|
||
<div id="mindMapContainer"></div>
|
||
```
|
||
|
||
```js
|
||
import MindMap from "simple-mind-map";
|
||
|
||
const mindMap = new MindMap({
|
||
el: document.getElementById('mindMapContainer'),
|
||
data: {
|
||
"data": {
|
||
"text": "根节点"
|
||
},
|
||
"children": []
|
||
}
|
||
});
|
||
```
|
||
|
||
# License
|
||
|
||
MIT |