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

Installation

npm

npm i @krthr/vue-dataflow-editor
1

Import the lib on app.js

// app.js or main.js, or the main file
// where you create the vue app
import Vue from "vue";
// other imports

import "@krthr/vue-dataflow-editor";
import "@krthr/vue-dataflow-editor/dist/vue-dataflow-editor.css";

const app = new Vue({
  /* ... */
});
1
2
3
4
5
6
7
8
9
10
11
<template>
  <vue-blocks-container
    class="container"
    :blocks-content="[]"
    :scene.sync="{}"
  />
</template>
1
2
3
4
5
6
7

browser

<head>
  <link
    rel="stylesheet"
    href="https://unpkg.com/@krthr/vue-dataflow-editor@latest/dist/vue-dataflow-editor.css"
  />
</head>
<body>
  <div id="app">
    <vue-blocks-container
      ref="container"
      :blocks-content="[]"
      :scene.sync="{}"
      class="container"
    />
  </div>

  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
  <script src="https://unpkg.com/@krthr/vue-dataflow-editor@latest/dist/vue-dataflow-editor.umd.min.js"></script>
  <script>
    new Vue({
      el: "#app"

      // ...
    });
  </script>
</body>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26