the vue toolkit for graph analysis based on g6, based on @antv/graphin
npm install antv-graphin-vue2. 使用vue重写ui组件以及behaviors组件以及components组件
yarn add antv-graphin-vue @antv/graphin
`Example
这个是使用jsx实现的vue版本的示例
`
import { defineComponent, reactive } from 'vue'
import Graphin, { Utils, Behaviors, Components } from 'antv-graphin-vue'
const { DragCanvas, ZoomCanvas, DragNode, ResizeCanvas } = Behaviors
const { MiniMap } = Componentsconst App = defineComponent({
components: { Graphin, DragCanvas, ZoomCanvas, DragNode, ResizeCanvas, MiniMap },
setup(props) {
const state = reactive({
data: {},
layout: {
type: 'force'
}
})
onMounted(() => {
state.data = Utils.mock(10).circle().graphin()
})
return () => (
)
}
})
export default App
``