项目作者: krthr

项目描述 :
Vue 2 dataflow graph editor
高级语言: Vue
项目地址: git://github.com/krthr/vue-dataflow-editor.git
创建时间: 2019-06-08T21:46:27Z
项目社区:https://github.com/krthr/vue-dataflow-editor

开源协议:

下载


vue-dataflow-editor

Hey, you can use https://github.com/jagenjo/litegraph.js.

Based on vue-blocks. A @ghostiam‘s project.

npm

  1. npm i @krthr/vue-dataflow-editor

Import the lib on app.js

  1. // app.js or main.js, or the main file
  2. // where you create the vue app
  3. import Vue from "vue";
  4. // other imports
  5. import "@krthr/vue-dataflow-editor";
  6. import "@krthr/vue-dataflow-editor/dist/vue-dataflow-editor.css";
  7. const app = new Vue({
  8. /* ... */
  9. });
  1. <template>
  2. <vue-blocks-container
  3. class="container"
  4. :blocks-content="[]"
  5. :scene.sync="{}"
  6. ></vue-blocks-container>
  7. </template>

browser

  1. <body>
  2. <div id="app">
  3. <vue-blocks-container
  4. ref="container"
  5. :blocks-content="[]"
  6. :scene.sync="{}"
  7. class="container"
  8. ></vue-blocks-container>
  9. </div>
  10. <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
  11. <script src="https://unpkg.com/@krthr/vue-dataflow-editor@latest/dist/vue-dataflow-editor.umd.min.js"></script>
  12. <script>
  13. new Vue({
  14. el: "#app",
  15. // ...
  16. });
  17. </script>
  18. </body>