Skip to content

Streamlining of schema #481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Sep 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ charset = utf-8
indent_style = tab
indent_size = 4
trim_trailing_whitespace = true

[{package.json,.travis.yml}]
indent_style = space
indent_size = 2
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ module.exports = {
globals: {
process: true
},
extends: ["eslint:recommended", "plugin:vue/essential"],
plugins: ["prettier"],
extends: ["eslint:recommended", "prettier", "plugin:vue/essential"],
plugins: ["prettier", "babel"],
rules: {
indent: [1, "tab", { SwitchCase: 1 }],
quotes: [1, "double", { allowTemplateLiterals: true }],
Expand Down
29 changes: 20 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
language: node_js
cache:
directories:
- node_modules
- node_modules

node_js:
- "9"
- "8"
- "6"
after_success:
- npm run coverall
- "10"
- "8"
- "6"

before_install:
- npm i -g npm@">=4.0.0"

install:
- npm install

script:
- npm test

deploy:
provider: npm
email: $NPM_EMAIL
api_key: $NPM_API_KEY
skip_cleanup: true
on:
tags: true
node: "8"
on:
tags: true
node: "8"

after_success:
- npm run coverall
26 changes: 16 additions & 10 deletions dev/projects/basic/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ export default {
fields: [
{
type: "input",
inputType: "text",
label: "First Name",
model: "first_name",
label: "First Name",
fieldOptions: {
inputType: "text"
},
attributes: {
input: {
"data-toggle": "tooltip"
Expand All @@ -60,9 +62,11 @@ export default {
},
{
type: "input",
inputType: "color",
label: "Color",
model: "color",
fieldOptions: {
inputType: "color"
},
attributes: {
input: {
"data-target": "tooltip"
Expand All @@ -71,18 +75,20 @@ export default {
},
{
type: "submit",
buttonText: "Change Previous Type",
attributes: {
input: {
"data-target": "toggle"
}
},
onSubmit: () => {
// this.schema.fields[2].type = "input";
if (this.schema.fields[2].inputType === "color") {
this.schema.fields[2].inputType = "text";
} else {
this.schema.fields[2].inputType = "color";
fieldOptions: {
buttonText: "Change Previous Type",
onSubmit: () => {
// this.schema.fields[2].type = "input";
if (this.schema.fields[2].fieldOptions.inputType === "color") {
this.schema.fields[2].fieldOptions.inputType = "text";
} else {
this.schema.fields[2].fieldOptions.inputType = "color";
}
}
}
}
Expand Down
22 changes: 12 additions & 10 deletions dev/projects/checklist/app.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<template>
<div class="container">
<h1>Checklist</h1>
<h1>Checklist</h1>
<div class="row">
<div class="col-sm-12">
<div class="col-sm-12">
<vue-form-generator :schema="schema" :model="model" :options="formOptions"></vue-form-generator>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<pre v-if="model" v-html="prettyModel"></pre>
</div>
</div>
<div class="col-sm-12">
<pre v-if="model" v-html="prettyModel"></pre>
</div>
</div>
</div>
</template>

Expand All @@ -35,8 +35,10 @@ export default {
model: "skills",
required: true,
inputName: "skill",
min: 2,
listBox: true,
fieldOptions: {
min: 2,
listBox: true
},
values: ["HTML5", "Javascript", "CSS3", "CoffeeScript", "AngularJS", "ReactJS", "VueJS"],
validator: validators.array,
onChanged(model) {
Expand Down
4 changes: 2 additions & 2 deletions dev/projects/full/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.1.4/css/ion.rangeSlider.skinHTML5.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/pikaday/1.4.0/css/pikaday.min.css">
<link rel="stylesheet" type="text/css" href="https://unpkg.com/vue-multiselect@2.0.8/dist/vue-multiselect.min.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/noUiSlider/9.0.0/nouislider.min.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/noUiSlider/11.1.0/nouislider.min.css">


<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.js"></script>
Expand All @@ -30,7 +30,7 @@
<script type="text/javascript" src="https://unpkg.com/vue-multiselect@2.0.8/dist/vue-multiselect.min.js"></script>
<script type="text/javascript" src="https://rawgit.com/nosir/cleave.js/master/dist/cleave.min.js"></script>
<script type="text/javascript" src="https://nosir.github.io/cleave.js/lib/cleave-phone.i18n.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/noUiSlider/9.0.0/nouislider.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/noUiSlider/11.1.0/nouislider.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pikaday/1.5.1/pikaday.min.js"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCEz-sX9bRJorDS-D_JL0JkZVZe2gzoUMw&amp;libraries=places"></script>

Expand Down
Loading