Dear habr, I want to share with you my experience in choosing and using form generators for Vue.js.
Introduction
Perhaps everyone knows that any choice begins with fixing goals, setting objectives and forming a list of requirements for the objects of choice. This article describes the functionality of out-of-the-box solutions and is not intended to answer all the questions within this topic.
If you are just diving into this subject area, the first thing you need to do is evaluate the applicability of this approach to your development. The following situations can be distinguished when this approach will pay off:
- , , copy & paste ;
- UX (User eXperience);
- .
( ):
- , , , README . , , .
, . , , React Angular, , Vue.js, , , . Element โ UI kit, - , , - .
vue-json-schema
, ~360 github, 2018 , Element UI, , .
- 1.1.1, 2.0.0 alpha production ;
- , ยซ ยป ;
- , Vue.js 2.2.0 .
- JSON schema ;
- Element UI.
ncform
, ~900 github . , . . Unit cypress. , JSON schema, .
- ;
- JSON schema;
- UI controls.
- ;
- ;
- JSON schema dx-;
- Element UI.
vue-form-generator
- : github npm;
- Element UI: github npm;
- Fork Element UI c : github npm;
- UI controls , vue ;
- vue-form-generator.
- JSON , โ ;
- , JSON schema;
- i18n ;
- .
- ;
- ;
- Element UI.
vue-form-json-schema
JSON schema , UI , UI โ uiSchema. ajv, , ajv-errors. , uiSchema.
- Element UI, ;
- uiSchema, template vue-.
- JSON schema;
- , ;
- , .
vue-ele-form
github ~530, . demo , .
- , ;
- JSON schema .
- , ;
- 10 ;
- Element UI.
form-create
~2100 github, . JSON, , JSON schema. Element UI.
- JSON schema ;
- , , , ;
- , : Text, JSON, Code Markdown ;
- Element UI.
vue-vuelidate-jsonschema
, Vue , state , .
json2vue
JSON, , .. , ..
vue-form-builder
, Element UI, .
, , :
- vue-form-json-schema , Element UI, uiSchema , , ;
- vue-json-schema , , , Element UI;
- ncform JSON schema , Element UI, ;
- vue-form-generator JSON schema , i18n, Element UI.
, :
- JSON schema;
- ;
- ;
- Element UI.
, ncform . JSON schema , Element UI, , , , .
If your choice, like the choice of the author, stops at ncform, then you can use this fork: github and npm . As part of it, work has been done to translate errors from standard validators into Russian and English out of the box, the functionality of the Element UI visual components has been expanded, the work of some validators has been fixed, for example, for list objects of the array type.
The author hopes that this article will at least slightly ease the pain of choice in a similar situation, and that you can find a solution that suits you in less time.