A Vue component to mind-mapping
npm install vue-mind-mappingA Vue component to mind-mapping
一个类似思维导图的小工具
## demo演示
demo
!dragScreenshot
## 安装
``JS`
npm install vue-mind-mapping -S
`
## 使用
js
使用之前一定要安装svg.js
svg.js
import svgJs from "svg.js/dist/svg"
export default {
install(Vue) {
Vue.prototype.$svg = svgJs
}
}
main.js
import svgJs from "./svg.js"
Vue.use(svgJs);
// ES6
import vuemindmapping from 'vue-mind-mapping'
Vue.use(vuemindmapping)
:width = 'width'
:height = 'height'
:spacing = '50'
topColor = '#646464'
:fontSize = '30'
:fontLength = '10'
:onlyColor = 'true'
>
`$3
初始宽高
`js``
'{
"x":5,
"y":400,
"title":"主标题",
"index":0,
"color":"#646464",
"size":30,
"sprites":[
{
"x":185,
"y":-171.0703125,
"title":"随机分配颜色",
"index":1,
"color":"#e78ed9",
"size":24,
"sprites":[ ]
}
]
}',