


你好,Vue 开发者!🎉 隆重介绍 VueWeave——一款专为 Vue 3 生态系统量身定制的现代节点流程编辑器。无论你是要构建复杂的可视化工作流、前沿的 AI 管道,还是富有交互性的图表,VueWeave 都能让你以最少的代码,轻松实现创意。我们深知你的需求,因此 VueWeave 充分利用了你所钟爱的现代 Vue 3 特性,告别了传统工具的繁琐。
VueWeave 以其卓越的灵活性和开发友好性脱颖而出:
<GraphCanvasBase />,即可立即开始构建你的流程图。享受完整的类型安全和智能提示。⚡
与市面上其他解决方案相比,VueWeave 为什么是你的不二之选?
“VueWeave 充分利用了你所喜爱的现代 Vue 3 特性,与 React Flow 或过时的 LiteGraph 不同。”
我们为你整理了一个简单的对比,助你做出明智选择:
开始使用 VueWeave 就像数到三一样简单!
npm install vueweave
或
yarn add vueweave
main.ts 或全局 CSS 中):
import "vueweave/style.css";
<template>
<GraphCanvasBase />
</template>
<script setup>
import { onMounted } from "vue";
import { useFlowStore, GraphCanvasBase } from "vueweave";
const flowStore = useFlowStore();
onMounted(() => {
flowStore.initData(
[
{ type: "node", nodeId: "A", position: { x: 100, y: 100 }, data: {} },
{ type: "node", nodeId: "B", position: { x: 400, y: 100 }, data: {} },
],
[
{ type: "edge", source: { nodeId: "A", index: 0 }, target: { nodeId: "B", index: 0 } },
],
{}
);
});
</script>
就是这样!你现在就拥有了一个功能完善的流程编辑器。欲了解更多详细文档和 API 参考,请访问我们的 GitHub 仓库。📚