# form-create
**Repository Path**: endung/form-create
## Basic Information
- **Project Name**: form-create
- **Description**: form-create 是一个可以通过 JSON 生成具有动态渲染、数据收集、验证和提交功能的表单生成组件。支持3个UI框架,并且支持生成任何 Vue 组件。内置20种常用表单组件和自定义组件,再复杂的表单都可以轻松搞定。
- **Primary Language**: JavaScript
- **License**: MIT
- **Default Branch**: 2.5
- **Homepage**: http://www.form-create.com/v2
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 254
- **Created**: 2021-02-19
- **Last Updated**: 2022-02-21
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# form-create
[](https://github.com/xaboy/form-create)
[](https://github.com/xaboy)
[](http://www.form-create.com/en/v2/)
**form-create is a form generation component that can generate dynamic rendering, data collection, verification and submission functions through JSON. Supports 3 UI frameworks, and supports the generation of any Vue components. Built-in 20 kinds of commonly used form components and custom components, no matter how complex forms can be easily handled.**
[开源的vue可视化表单设计器组件](https://github.com/xaboy/form-create-designer) ([功能演示](http://form-create.com/designer?fr=fc))
[Vue3 Version](https://github.com/xaboy/form-create/tree/next)
## [中文 README](https://github.com/xaboy/form-create/blob/2.5/README_zh-CN.md)
## Support
- **iview**
- **view-design**
- **element-ui**
- **ant-design-vue**
If you have a form component suitable for form-create, please feel free to [click here to leave a message](https://github.com/xaboy/form-create/issues/124)
> If it helps, you can click on "Star" in the upper right corner. Thank you!
> The project is still being developed and improved. If there are any 'recommendations or questions, please ask [here](https://github.com/xaboy/form-create/issues/new)
> 本项目QQ讨论群[28963712](https://jq.qq.com/?_wv=1027&k=54aKUVw)
> [Update log](http://www.form-create.com/en/v2/guide/update.html)
- **Preview**

More
- **Form operations**
[description](http://www.form-create.com/en/v2/instance.html)

- **`group` component**
[description](http://www.form-create.com/en/v2/guide/group.html)

- **`control` configuration**
[description](http://www.form-create.com/en/v2/guide/control.html)

## Docs
[简体中文](http://www.form-create.com/v2/) | [Vue3版本](http://www.form-create.com/v3/) | [English](http://www.form-create.com/en/v2/)
## Packages
| Name | Description |
| ------------------ | ---------------------------------------------------------- |
| @form-create/iview [](https://www.npmjs.com/package/@form-create/iview) [](https://www.npmjs.com/package/@form-create/iview) | [iview version](http://form-create.com/v2/iview/) |
| @form-create/iview4 [](https://www.npmjs.com/package/@form-create/iview4) [](https://www.npmjs.com/package/@form-create/iview4) | [view-design version](http://form-create.com/v2/iview/) |
| @form-create/element-ui [](https://www.npmjs.com/package/@form-create/element-ui) [](https://www.npmjs.com/package/@form-create/element-ui) | [element-ui version](http://form-create.com/v2/element-ui/) |
| @form-create/ant-design-vue [](https://www.npmjs.com/package/@form-create/ant-design-vue) [](https://www.npmjs.com/package/@form-create/ant-design-vue) | [ant-design-vue version](http://form-create.com/v2/ant-design-vue/) |
| @form-create/designer [](https://www.npmjs.com/package/@form-create/designer) [](https://www.npmjs.com/package/@form-create/designer) | [Form Designer](http://form-create.com/designer) |
## Example
- [Demo case](https://github.com/HeyMrLin/fc-demo) ([Demo station](http://jeekweb.pro/form-create-demo))
- [Generate a form using the maker generator](https://jsrun.net/NQhKp/edit)
- [Generate a form using the json parameter](https://jsrun.net/NQhKp/edit)
- [Component example](http://www.form-create.com/en/v2/guide/demo.html)
Legend

## Install
> Install the corresponding version according to the UI you use
>iview
```shell
npm install @form-create/iview
```
view-design
```shell
npm install @form-create/iview4
```
element-ui
```shell
npm install @form-create/element-ui
```
ant-design-vue
```shell
npm install @form-create/ant-design-vue
```
## Import
**CDN:**
iview
```html
```
element-ui
```html
```
ant-design-vue
```html
```
**NodeJs:**
iview
```js
import formCreate from '@form-create/iview'
Vue.use(formCreate)
```
element-ui
```js
import formCreate from '@form-create/element-ui'
Vue.use(formCreate)
```
ant-design-vue
```js
import formCreate from '@form-create/ant-design-vue'
Vue.use(formCreate)
```
## Usage
```html
```
```javascript
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:'Modify field1',
native: false,
on:{
click: ()=>{
this.rule[0].value+='a'
}
},
children: ['Click'],
}
]
}
}
}
```
## Demo
Download project
```sh
$ git clone https://github.com/xaboy/form-create.git
$ cd form-create
```
Install dependencies
```sh
$ npm run bootstrap
```
iview Demo
```sh
$ npm run dev:iview
```
view-design Demo
```sh
$ npm run dev:iview4
```
element-ui Demo
```sh
$ npm run dev:ele
```
ant-design-vue Demo
```sh
$ npm run dev:antd
```
## Thank
[时光弧线](https://github.com/shiguanghuxian) | [wxxtqk](https://github.com/wxxtqk) | [williamBoss](https://github.com/williamBoss) | [HeyMrLin](https://github.com/HeyMrLin) | [djkloop](https://github.com/djkloop) | [JetBrains](https://www.jetbrains.com/?from=form-create)
## Donation

## Contact
##### email : xaboy2005@qq.com
## License
[MIT](http://opensource.org/licenses/MIT)
Copyright (c) 2018-present xaboy