中文 | English
Classic modular front-end UI framework
####Introduction
The preliminary design of the form designer based on layui is based on FWR layui FormDesigner.
####Statement: the basic code has been uploaded. You can play on it and test the bug. I hope you can ask questions and participate in providing some interesting components. Now the first version v1.0.0 is released. It is not easy to develop and write documents, and there are not many requirements. It needs some development power to support a star. Hey hey
####Demo address
####Note: the basic components have been written almost. Later, the overall function will be optimized to improve the sense of experience. Later, some display effects will be optimized, mainly for the acquisition and echo of form data. The handwritten signature component is not open source for the time being. The handwritten signature is adaptive to the PC and mobile terminal, but you can experience some and put forward useful opinions.
####Handwritten signature presentation address
http://www.anyongqiang.com/HandwrittenSignature/index.html
####Instructions for use
The project is based on layui, jQuery and sortable
The project has basically realized drag layout and parent-child layout
The project implements the layout of most form form controls based on layui, including input box, editor, drop-down, radio, radio group, multiple selection group, date, slider, scoring, rotation, picture, color selection, picture upload, file upload, date range, sorting text box, icon selector, cron expression and handwritten signature component
####Development plan
Support layui form components
Extension components supporting layui
Support the method of FormDesigner object to obtain the data filled in the form or echo the form data
Support automatic code generation
Support to obtain remote data dynamic display components through URL (such as pull box, editor, picture, etc.)
Support customized layout and background




####Introductory case (design page)
var render = formDesigner.render({
Data: [], / / form design data
elem:'#formdesigner'
});
//Re render data
render.reload(options)
//Get relevant configuration information
render.getOptions()
//Get form design data
render.getData()
//Get external editor object
render.geticeEditorObjects()
####Getting started cases (view page)
var render = formPreview.render({
elem: '#testdemo',
Data: [], / / form design data
formData: {"textarea_ 1":"123",
"input_ 2":"123",
"password_ 3 ":" 123 "} / / form data to echo
});
//Re render data
render.reload(options)
//Get relevant configuration information
render.getOptions()
//Get form design data
render.getData()
//Get external editor object
render.geticeEditorObjects()
//Get the ID and upload path of the uploaded picture
render.getImages()
//The ID of the file object corresponding to the data case select uploadurl corresponds to the upload path of the file
[{select: "imageimage_ 2",uploadUrl: ""}]
//Get the ID and upload path of the uploaded file
render.getFiles()
//The ID of the file object corresponding to the data case select uploadurl corresponds to the upload path of the file
[{select: ""filefile_ 1"",uploadUrl: ""}]
//Get form data
**
Note: the current method will avoid the verification rules, and it is best to put it in the form submission
form.on('submit(demo1)', function(data){});
**
render.getFormData()
//Echo form data
render.setFormData(json)
//Disable forms globally
render.globalDisable()
//Global enable form
render.globalNoDisable()
**
Note: two components of these methods are not controlled (file component and picture component),
I propose these two components separately through methods, because there are many ways to upload files,
It is proposed that users define and implement their own file upload methods,
Specific cases have been written in preview.html for your own reference
**
####Basic parameters
|Parameter | type | description | example value|
|---|---|---|---|
|Elem | string | specifies the selector of the original table container. The method rendering method is required | "#elem"|
|Data | array | directly assign data | [{}, {},...]|
|Formdata | array | echoed form data | [{}, {},...]|
####Component parameters
|Parameter | type | description | example value|
|---|---|---|---|
|ID | string | specifies the component ID (unique), and the name value of the form submission field | "field"|
|Label | string | text box title | "name"|
|Tag | string | form type | "input"|
|Placeholder | string | placeholder | "please enter"|
|DefaultValue | object | component default value | name|
|Width | string | component width | "100%"|
|Labelwidth | string | text box width | "250px"|
|Readonly | Boolean | read only | true, false|
|Disabled | Boolean | disable | true, false|
|Required | Boolean | required | true, false|
|Columns | number | number of grid layout columns | true, false|
|Maxvalue | object | maximum | ""|
|MinValue | object | minimum | ""|
|Expression | string | validation | "email"|
|Stepvalue | number | slider step | 2|
|Isinput | Boolean | slider displays the input box | true, false|
|Datetype | string | date type | time selector|
|Dateformat | string | date format | "yyyy MM DD"|
|Ratelength | number | number of stars | 5|
|Interval | number | rotation interval MS | 3000|
|Autoplay | Boolean | rotation automatic switching | true, false|
|Anim | object | switching mode {text: 'left and right switching', value: 'default'}|
|Arrow | object | switching arrow {text: 'hover display', value: 'hover'}|
####Update log
Add the basic verification rules provided by the input box layui
Disabled display effect optimization
Optimize the form display slider, score and color selector, and the field value cannot be obtained when submitting
Add time range component (code not submitted yet)
Page adaptive optimization
Add time range component
Presentation page submission parameter optimization
Add iceeditor rich text editing component
Solve the problem of abnormal style of one row and multiple columns
One row and multiple columns nesting problem
The optimized rich text parameters cannot be obtained
Add sorting text box component
Add Icon selector component
Add cron expression component
Optimize the rich text editor (if you edit the menu, the local direct access will cause cross domain problems, and it will be normal to put it into nginx, Tomcat and other containers)
Release v1.0.0
Update version v1.0.1
Add label components
Add button assembly
Optimizing the internal dragging of the fence is a problem of style confusion
Optimize the components that have been put into multiple, and the drag sorting is invalid
There are too many optimized component labels, and the component sorting style is misaligned
Optimize the interaction between components
Acquisition and echo of new form data in form view
Add disabled form and enabled form in form view
Update version V1.1.0
Drop down, multi-choice, single choice, rotation configuration, multiple options to add drag function
Optimize the drop-down, multi-choice, single choice and rotation default options (the default values can be set on the configuration and design pages)
Optimize the width experience and change it to slider
Add and modify the text box length attribute, and the slider operation
Add required items to display*
Optimize code generation function
Add a new window to open the display page
Update version v1.1.5
Simplify the style introduced and return to the simplicity of layui
Optimize some related details
Update version v1.1.6
####Stunt
Use Readme_ 30. MD to support different languages, such as readme_ en.md, Readme_ zh.md
Gitee official blog [blog. Gitee. Com]( https://blog.gitee.com )
You can[ https://gitee.com/explore ]( https://gitee.com/explore )Use this address to learn about excellent open source projects on gitee
[GVP]( https://gitee.com
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
Activity
Community
Health
Trend
Influence
:Code submit frequency
:React/respond to issue & PR etc.
:Well-balanced team members and collaboration
:Recent popularity of project
:Star counts, download counts etc.