Giter Club home page Giter Club logo

cceditor's Introduction

CCEditor

cceditor

vue g6 license release sponsor

A visual graph editor component library based on G6 and Vue.js.
基于 G6 和 Vue 的可视化图形编辑组件库。

一、 版本

开发版本
v0.1.0

二、预览

DEMO演示

三、项目依赖

四、项目结构

.
├── packages  // 源码
├── examples  // 用例(开发调试用)
├── 其它
|

五、开发方式

1. 调试

npm install
npm run serve

2. 发布

npm run lib
npm pack

六、使用方式

1. 安装CCEditor

# 本地安装
npm install chaincloud-cceditor-0.1.0.tgz

# npm安装(暂不支持)
npm install @chaincloud/cceditor --save

本地安装:安装包下载

2. 引入CCEditor

全局注册

main.js 中写入以下内容:

  • 完整引入:引入整个CCEditor:
import Vue from 'vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'

import App from './App.vue'

Vue.use(ElementUI)

/* 全局注册:引入整个CCEditor */
import CCEditor from '@chaincloud/cceditor'
Vue.use(CCEditor)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
  • 按需引入:引入需要的模块,例如CCTopology:
import Vue from 'vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'

import App from './App.vue'

Vue.use(ElementUI)

/* 全局注册:只加载CCTopology */
import { CCTopology } from '@chaincloud/cceditor'
Vue.use(CCTopology)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

局部注册

ComponentA.vue 中进行局部注册:

<script>
import { CCTopology } from '@chaincloud/cceditor'

export default {
  name: 'ComponentA',
  components: {
    'cc-topology': CCTopology
  }
}
</script>

3. 开始使用

属性

TODO...

方法

TODO...

七、备注

  • [已解决] 升级 G6 到 3.5.0 后,发现 G6 底层有 bug:调用addItem方法报错:p.getType is not a function。该 bug 导致编辑(连线)功能不可用,需等待下个小版本的修复。—— 2020.06.02
  • [已解决] 由于 G6 在 3.3.x 版本作了 breaking change,且遗留了一些 bug。本项目先暂停更新。预计 6 月份或 G6 底层这些重要 bug 修复后,继续跟进。—— 2020.03.01

cceditor's People

Contributors

wenyuan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.