程序员求职经验分享与学习资料整理平台

网站首页 > 文章精选 正文

Variant Form — 高效、可拖拽的低代码表单

balukai 2025-06-18 19:09:52 文章精选 3 ℃

平时搬砖也算是接触了不少的低代码表单,但是今天给大家分享的这款低代码表单绝对会让你的眼前一亮。不仅支持vue2、vue3,而且还提供了移动端,还适配了uniapp。怎么样,就我目前的见到的很少能够同时适配这么多的表单,它就是今天的主角 — Variant Form

废话不多说,我们直接上干货!

介绍

Variant Form 是一款基于vue2/vue3的低代码表单,支持
element-ui/element-plus/iview ui框架,为前端开发人员提供了快速开发表单以及收集数据的功能。

为什么名字是Variant Form ?官方的解释是灵活的、多样的、动态化的表单。

Variant Form是由VFormDesigner和VFormRender两部分构成。VFormDesigner是表单设计器,负责通过组件拖拽方式生成JSON格式的表单对象;VFormRender是表单渲染器,负责将表单JSON渲染为Vue组件。

Variant Form还为同学们提供了iview 以及vscode插件,实在是太好了。

官网地址:https://www.vform666.com/

特性

功能列表

Variant Form 分VForm2、VForm3、Mobile ,对应的功能列表也不一样。

VForm2:



VForm3:

安装使用

现在基本上很少有用vue2的了吧,即使有我估计也是很头疼,不仅node需要来回切,各种依赖搞的人想骂街。所以我就直接从vue3开始了。

npm i element-plus #v3 依赖于element-plus 需要先安装

npm i vform3-builds
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
	<title>VForm 3 Designer Demo</title>
	<link rel="stylesheet" href="https://cdn.staticfile.net/element-plus/2.5.1/index.min.css">
	<link rel="stylesheet" href="designer.style.css?t=20220202"> <!-- 根据Web服务器或CDN路径修改 -->
  <style type="text/css">
	  body {
	    margin: 0;  /* 消除垂直滚动条 */
	  }
	</style>
</head>
<body>

  <div id="app">
	  <v-form-designer ref="VFDesigner"></v-form-designer>
  </div>

<script src="https://cdn.staticfile.net/vue/3.3.4/vue.global.js"></script>
<script src="https://cdn.staticfile.net/element-plus-icons-vue/2.3.1/global.iife.min.js"></script>
<script src="https://cdn.staticfile.net/element-plus/2.5.1/index.full.min.js"></script>
<script src="designer.umd.js?t=20220202"></script> <!-- 根据Web服务器或CDN路径修改 -->
<script>
	Vue.createApp({})
     .use(ElementPlus)
     .use(VFormDesigner)
     .mount("#app");
</script>
</body>
</html>

效果图:

总结

简单clone体验了一下确实很强大,界面风格也好看,但是会有logo存在,而且不能去掉,这个就不太友好,需要开通pro版本才支持,不过作者能开发成这样已经很不错了。大家多多支持。



好了,今天就介绍这么多了,感兴趣的同学可以下载源码体验一下啦。同时也欢迎大家评论区留言讨论。

Tags:

最近发表
标签列表