# mindmap
**Repository Path**: hyacinth_YX/mindmap
## Basic Information
- **Project Name**: mindmap
- **Description**: 思维导图VUE组件 - mindmap: vue component
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 13
- **Forks**: 1
- **Created**: 2020-02-26
- **Last Updated**: 2024-01-10
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Mindmap Vue Component

Based on d3.js
[中文说明](./README.cn.md)
Online demo:
## Function
Support keyboard and mouse
- Drag
- Zoom
- Add, delete and edit node
- ...
## Usage
- tab - Add child node
- enter - Add siblings
- delete - Delete node
- right click - Open contextMenu
- click twice - Edit node content
- ...
## Install
```sh
npm install @hellowuxin/mindmap
```
```js
// In your vue file
import mindmap from '@hellowuxin/mindmap'
```
## API
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| v-model | Array | undefined | Set up mindmap data |
| width | Number | 100% | Set component width |
| height | Number | 100% | Set component height |
| xSpacing | Number | 80 | Set node horizontal spacing |
| ySpacing | Number | 20 | Set node vertical spacing |
| draggable | Boolean| true | Set whether the node is draggable |
| gps | Boolean| true | Whether to show the center button |
| fitView | Boolean| true | Whether to show the zoom button |
## Example
```html
```
## Todo
- [ ] Export multiple formats
- [ ] Set node width and height
- [ ] Multiple root nodes
- [ ] Collapse node
- [ ] ...