2 Star 2 Fork 1

eaglet / vue4_d3v5_forcedirected

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

vuecli4 d3v5 力导向图示例(封装组件)

vue d3v5

项目简介

前段时间接到一个项目,参考这个网站https://www.ownthink.com/ (思知),做一个类似功能的知识图谱功能的平台。需要使用D3V5开发,所以就做了这么一个demo程序。 使用d3v5开发的ForceDirected的vue组件,方便灵活使用。

本项目参考官方示例:https://gywgithub.github.io/vue-d3-examples/#/examples/forcedirected

如果觉得本项目能帮助到你,欢迎star支持,谢谢。

项目效果

输入图片说明

框架版本

  1. nodejs v12.16.1
  2. vue/cli 4.4.6
  3. d3/5.16.0

框架结构

    src             --  资源目录
        axios       --  封装axios
        assets      --  静态资源文件
        components  --  组件
        router      --  路由,负责指定页面链接
        service     --  服务层,数据联调,引入请求
        store       --  Vuex
        views       --  视图页面
        main.js     --  入口文件

项目安装

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

项目访问入口

http://localhost:8080/

修改vue默认配置信息

module.exports = {
    // 公共路径(必须有的)
    publicPath: "./",
    // 输出文件目录
    outputDir: "dist",
    // 静态资源存放的文件夹(相对于ouputDir)
    assetsDir: "assets",
    // eslint-loader 是否在保存的时候检查(果断不用,这玩意儿我都没装)
    lintOnSave: false,
    // 我用的only,打包后小些
    runtimeCompiler: false,
    productionSourceMap: true, // 不需要生产环境的设置false可以减小dist文件大小,加速构建

    devServer: {
        open: true,  // npm run serve后自动打开页面
        host: '0.0.0.0',  // 匹配本机IP地址(默认是0.0.0.0)
        port: 8089, // 开发服务器运行端口号
        proxy: null,
    },
}

更新日志

  • 2020年7月24日
  1. 上传demo示例
MIT License Copyright (c) 2020 eaglet Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Vue4 d3v5 力导向图示例 展开 收起
NodeJS 等 4 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
NodeJS
1
https://gitee.com/e4glet/vue4_d3v5_forcedirected.git
git@gitee.com:e4glet/vue4_d3v5_forcedirected.git
e4glet
vue4_d3v5_forcedirected
vue4_d3v5_forcedirected
master

搜索帮助