Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c0aa24d

Browse files
author
Lionel Bijaoui
committed
Streamlining of schema
1 parent 5521f0b commit c0aa24d

File tree

5 files changed

+329
-422
lines changed

5 files changed

+329
-422
lines changed

‎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
}

‎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)

AltStyle によって変換されたページ (->オリジナル) /