1、安装:通过 npm 或 yarn 安装 Vue Flow。
npm install @vueflow/core# 或者yarn add @vueflow/core
2、引入:在你的 Vue 3 项目中引入 Vue Flow。
import { VueFlow, Background, Controls, MiniMap } from '@vueflow/core';
3、使用:在 Vue 组件中使用 Vue Flow,并根据需要配置节点和边缘。
<template><VueFlow><Background color="#eee" /><Controls /><MiniMap /><!-- 定义节点和边缘 --></VueFlow></template>
Vue Flow 官网:https://vueflow.dev/