vue-generators / vue-form-generator-docs Goto Github PK
View Code? Open in Web Editor NEWOfficial Documentation for Vue Form Generator
Home Page: https://vue-generators.gitbook.io/vue-generators/
License: MIT License
Official Documentation for Vue Form Generator
Home Page: https://vue-generators.gitbook.io/vue-generators/
License: MIT License
Documentation regarding the use of groups should be updated.
the example on this page has formOptions as a nested element of "schema" element. This throws an error on rendering. When I changed it to be a part of object returned from data() function, the component rendered successfully.
formOptions: { validateAfterLoad: true, validateAfterChanged: true, fieldIdPrefix: 'user-' }
checked the above issue at this documentation page as well
The links for the component docs are broken, this occurred when moving the files into the component folder.
it is not clear from the documentation how to import the validator used in the example on this page
Usage Example
checked the above issue at this documentation page as well
model-updated docs seem incorrect. In 2.3.4, the schema argument has a model string, whereas docs say:
schema is a reference to the individual field schema. schema will only contain the individual field data, and not the full schema
For accessibility requirements, the required fields should add a red asterisk.
<label for="firstname">First name <abbr class="req" title="required">*</abbr>:</label>
I'd like to know if there is any option could help it.
If not, I'd like to request this feature.
As the articles below explained.
https://www.w3.org/TR/WCAG20-TECHS/H90.html#H90-ex2
https://vue-generators.gitbook.io/vue-generators/validation
Thanks.
I tried the example on this page. However could not get it working in the first go. The corrected code is as below.
Example on jsfiddle is a working solution, IMHO this should also be reflected in the documentation page.
corrections added in comments //***
export default {
data() {
return {
model: {
id: 1,
name: "John Doe",
password: "J0hnD03!x4",
skills: "Javascript",//instead of an array, if the field is only of type 'select' this should be a string value
email: "[email protected]",
status: true
},
formOptions: {
validateAfterLoad: true,
validateAfterChanged: true,
fieldIdPrefix: "user-"
},
schema: {
groups: [
{
legend: "User Details",
fields: [
{
type: "input",
inputType: "text",
label: "ID (disabled text field)",
model: "id",
readonly: true,
disabled: true
},
{
type: "input",
inputType: "text",
label: "Name",
model: "name",
id: "user_name",
placeholder: "Your name",
featured: true,
required: true
},
{
type: "input",
inputType: "email",
label: "E-mail",
model: "email",
placeholder: "User's e-mail address"
},
{
type: "input",
inputType: "password",
label: "Password",
model: "password",
min: 6,
required: true,
hint: "Minimum 6 characters",
validator: validators.string
}
]
},
{
legend: "Skills & Status",
fields: [
{
type: "select",
label: "Skills",
model: "skills",//the model was specified as 'type' corrected to 'skills' to match the model
values: ["Javascript", "VueJS", "CSS3", "HTML5"]
},
{
type: "checkbox",
label: "Status",
model: "status",
default: true
}
]
}
]
}
};
}
};```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.