React + umi +antd+antv/g6 實現力圖

官方示例效果:http://antv.alipay.com/zh-cn/g6/2.x/demo/net/2017-link-data.htmlhtml

改編效果:node

實現步驟:react

  環境:nodejs、yarn/npm、umi(最新便可)git

  建立項目:npm

    1.打開cmdantd

    2.建立項目文件夾:輸入mkdir ReactUmiG6App & cd ReactUmiG6App 回車編碼

    3.建立項目:yarn create umihtm

     4.添加須要的依賴包:react 、antd、@antv/g6blog

        yarn add antd、yarn add react 、yarn add @antv/g6ip

     5.以上就是全部準備,接下來就能夠具體實現了

 具體編碼參考官方API及實例就可,其餘須要注意的就是依賴引用了,如下供參考

 最後附上源碼:

https://gitee.com/wiaoong/studynotes.git

相關文章
相關標籤/搜索