103 Star 590 Fork 153

xaboy / form-create

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

form-create v3

MIT github document vue3

form-create 是一个可以通过 JSON 生成具有动态渲染、数据收集、验证和提交功能的表单生成组件。支持5个UI框架,并且支持生成任何 Vue 组件。内置20种常用表单组件和自定义组件,再复杂的表单都可以轻松搞定。

这个是 Vue3 版本

开源的vue可视化表单设计器组件 (功能演示)

支持

  • element-plus
  • ant-design-vue
  • naive-ui
  • arco-design
  • tdesign

如果对您有帮助,您可以点右上角 "Star" 支持一下 谢谢!本项目还在不断开发完善中,如有任何建议或问题请在这里提出

本项目QQ讨论群629709230

更新日志

  • 预览

demo1

更多
  • 操作表单

详细说明

demo2

  • group 组件

详细说明

demo3

  • control 配置项

详细说明

demo2

文档

简体中文

包说明

包名 说明
@form-create/element-ui version npm element-plus 版本
@form-create/ant-design-vue version npm ant-design-vue 版本
@form-create/arco-design version npm arco-design 版本
@form-create/naive-ui version npm naive-ui 版本
@form-create/tdesign version npm tdesign 版本
@form-create/designer version npm 表单设计器 (已适配 Vue3)

示例

图例

https://raw.githubusercontent.com/xaboy/form-create/dev/images/sample110.jpg

安装

根据自己使用的 UI 安装对应的版本

element-ui

npm install @form-create/element-ui@next

ant-design-vue

npm install @form-create/ant-design-vue@next

arco-design

npm install @form-create/arco-design@next

naive-ui

npm install @form-create/naive-ui@next

tdesign

npm install @form-create/tdesign@next

引入

CDN:

element-plus

<link href="https://unpkg.com/element-plus@2.0.1/dist/index.css"></link>
<script src="https://unpkg.com/vue@next"></script>
<script src="https://unpkg.com/element-plus@2.0.1/dist/index.full.js"></script>
<script src="https://unpkg.com/@form-create/element-ui@next/dist/form-create.min.js"></script>

ant-design-vue

<link href="https://unpkg.com/ant-design-vue@3.0.0-alpha.11/dist/antd.min.css"></link>
<script src="https://unpkg.com/vue@next"></script>
<script src="https://unpkg.com/dayjs"></script>
<script src="https://unpkg.com/ant-design-vue@3.0.0-alpha.11/dist/antd.min.js"></script>
<script src="https://unpkg.com/@form-create/ant-design-vue@next/dist/form-create.min.js"></script>

NodeJs:

element-plus ^2.0

import formCreate from '@form-create/element-ui'
app.use(formCreate)

element-plus (with unplugin-vue-components/vite & ElementPlusResolver)

import formCreate from '@form-create/element-ui'
import install from '@form-create/element-ui/auto-import'
formCreate.use(install)
app.use(formCreate)

ant-design-vue ^3.0

import formCreate from '@form-create/ant-design-vue'
app.use(formCreate)

arco-design ^2.0

import formCreate from '@form-create/arco-design'
app.use(formCreate)

naive-ui ^2.0

import formCreate from '@form-create/naive-ui'
app.use(formCreate)

tdesign ^0.17.3

import formCreate from '@form-create/tdesign'
app.use(formCreate)

使用

<form-create :rule="rule" v-model:api="fApi" :option="options" v-model="value"/>
export default {
    data(){
        return {
            fApi:{},
            value:{field1:'111',field2:'222',time:'11:11:11'},
            options:{
                onSubmit:(formData)=>{
                    alert(JSON.stringify(formData))
                }
            },
            rule:[
                {type:'input', field:'field1',title:'field1',value:'aaa'},
                {type:'input', field:'field2',title:'field2',value:'sss'},
                {type:'timePicker', field:'time',title:'time',value:'12:12:12'},
                {
                    type:'ElButton',
                    title:'修改 field1',
                    native: false,
                    on:{
                        click: ()=>{
                            this.rule[0].value+='a'
                        }
                    },
                    children: ['点击'],
                }
            ]
        }
    }
}

示例

下载项目

$ git clone https://github.com/xaboy/form-create.git
$ cd form-create

安装依赖

$ npm run bootstrap

查看 element-ui 示例

$ npm run dev:ele

查看 ant-design-vue 示例

$ npm run dev:antd

感谢

时光弧线 | wxxtqk | williamBoss | HeyMrLin | djkloop | daiwenyong | JetBrains

捐赠

donation.jpg

联系

email : xaboy2005@qq.com

License

MIT

Copyright (c) 2018-present xaboy

MIT License Copyright (c) 2022 xaboy Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

form-create 是一个可以通过 JSON 生成具有动态渲染、数据收集、验证和提交功能的表单生成组件。支持3个UI框架,并且支持生成任何 Vue 组件。内置20种常用表单组件和自定义组件,再复杂的表单都可以轻松搞定。 展开 收起
JavaScript 等 5 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/xaboy/form-create.git
git@gitee.com:xaboy/form-create.git
xaboy
form-create
form-create
next

搜索帮助