Skip to content

Commit fff0078

Browse files
author
Lionel Bijaoui
committed
Streamlining of schema
1 parent 1d3a0a3 commit fff0078

34 files changed

+631
-719
lines changed

dev/projects/basic/app.vue

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,14 @@ export default {
7777
"data-target": "toggle"
7878
}
7979
},
80-
onSubmit: () => {
81-
// this.schema.fields[2].type = "input";
82-
if (this.schema.fields[2].inputType === "color") {
83-
this.schema.fields[2].inputType = "text";
84-
} else {
85-
this.schema.fields[2].inputType = "color";
80+
fieldOptions: {
81+
onSubmit: () => {
82+
// this.schema.fields[2].type = "input";
83+
if (this.schema.fields[2].inputType === "color") {
84+
this.schema.fields[2].inputType = "text";
85+
} else {
86+
this.schema.fields[2].inputType = "color";
87+
}
8688
}
8789
}
8890
}

dev/projects/checklist/app.vue

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<template>
22
<div class="container">
3-
<h1>Checklist</h1>
3+
<h1>Checklist</h1>
44
<div class="row">
5-
<div class="col-sm-12">
5+
<div class="col-sm-12">
66
<vue-form-generator :schema="schema" :model="model" :options="formOptions"></vue-form-generator>
7-
</div>
8-
</div>
7+
</div>
8+
</div>
99
<div class="row">
10-
<div class="col-sm-12">
11-
<pre v-if="model" v-html="prettyModel"></pre>
12-
</div>
13-
</div>
10+
<div class="col-sm-12">
11+
<pre v-if="model" v-html="prettyModel"></pre>
12+
</div>
13+
</div>
1414
</div>
1515
</template>
1616

@@ -35,8 +35,10 @@ export default {
3535
model: "skills",
3636
required: true,
3737
inputName: "skill",
38-
min: 2,
39-
listBox: true,
38+
fieldOptions: {
39+
min: 2,
40+
listBox: true
41+
},
4042
values: ["HTML5", "Javascript", "CSS3", "CoffeeScript", "AngularJS", "ReactJS", "VueJS"],
4143
validator: validators.array,
4244
onChanged(model) {

0 commit comments

Comments
 (0)