Skip to content

Commit 5f0437a

Browse files
authored
Merge branch 'master' into error-handling
2 parents b515e44 + 90eadbd commit 5f0437a

File tree

5 files changed

+14
-12
lines changed

5 files changed

+14
-12
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,11 @@ let vm = new Vue({
6464
```
6565
```html
6666
<div id="el">
67-
<formly-form :form="form" :model="model" :fields="fields" @submit="doSomething">
68-
<button>Submit</button>
69-
</formly-form>
67+
<form @submit="doSomething">
68+
<formly-form :form="form" :model="model" :fields="fields">
69+
<button>Submit</button>
70+
</formly-form>
71+
</form>
7072
</div>
7173
```
7274
If you include the script it will be installed for you.

dist/vue-formly-bootstrap.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* vue-formly-bootstrap v2.0.1
2+
* vue-formly-bootstrap v2.0.2
33
* https://github.com/matt-sanders/vue-formly-bootstrap
44
* Released under the MIT License.
55
*/
@@ -703,7 +703,7 @@ return /******/ (function(modules) { // webpackBootstrap
703703

704704
this.$set(this.form[this.field.key], '$dirty', true);
705705
this.runFunction('onChange', e);
706-
if (this.to.type == 'file') {
706+
if (this.to.inputType == 'file') {
707707
this.$set(this.model, this.field.key, this.$el.querySelector('input').files);
708708
}
709709
}
@@ -761,7 +761,7 @@ return /******/ (function(modules) { // webpackBootstrap
761761
/* 41 */
762762
/***/ function(module, exports) {
763763

764-
module.exports = "\n<div class=\"form-group formly-input\" :class=\"[ to.type, {'formly-has-value': model[field.key], 'formly-has-focus': form[field.key].$active}]\">\n <label v-if=\"to.label\" :for=\"to.id ? to.id : null\">{{to.label}}</label>\n <input class=\"form-control\" :class=\"to.classes\" :id=\"to.id ? to.id : null\" type=\"text\" v-model=\"model[field.key]\" @blur=\"onBlur\" @focus=\"onFocus\" @click=\"onClick\" @change=\"onChange\" @keyup=\"onKeyup\" @keydown=\"onKeydown\" v-formly-atts=\"to.atts\" v-formly-input-type=\"to.inputType\">\n</div>\n";
764+
module.exports = "\n<div class=\"form-group formly-input\" :class=\"[ to.inputType, {'formly-has-value': model[field.key], 'formly-has-focus': form[field.key].$active}]\">\n <label v-if=\"to.label\" :for=\"to.id ? to.id : null\">{{to.label}}</label>\n <input class=\"form-control\" :class=\"to.classes\" :id=\"to.id ? to.id : null\" type=\"text\" v-model=\"model[field.key]\" @blur=\"onBlur\" @focus=\"onFocus\" @click=\"onClick\" @change=\"onChange\" @keyup=\"onKeyup\" @keydown=\"onKeydown\" v-formly-atts=\"to.atts\" v-formly-input-type=\"to.inputType\">\n</div>\n";
765765

766766
/***/ },
767767
/* 42 */
@@ -810,7 +810,7 @@ return /******/ (function(modules) { // webpackBootstrap
810810
exports.default = {
811811
mixins: [_baseField2.default],
812812
created: function created() {
813-
var type = this.to.type;
813+
var type = this.to.inputType;
814814
if ((!type || type == 'checkbox') && this.model[this.field.key] == '') this.$set(this.model, this.field.key, []);
815815
}
816816
};
@@ -819,7 +819,7 @@ return /******/ (function(modules) { // webpackBootstrap
819819
/* 44 */
820820
/***/ function(module, exports) {
821821

822-
module.exports = "\n<div class=\"checkbox formly-list\" :id=\"to.id\" :class=\"to.classes\">\n\n <label v-for=\"option in field.options\">\n <input v-if=\"!to.type || to.type == 'checkbox'\" type=\"checkbox\" v-model=\"model[field.key]\" :value=\"option.value || option\" @blur=\"onBlur\" @focus=\"onFocus\" @click=\"onClick\" @change=\"onChange\" @keyup=\"onKeyup\" @keydown=\"onKeydown\" v-formly-atts=\"to.atts\">\n <input v-if=\"to.type == 'radio'\" type=\"radio\" v-model=\"model[field.key]\" :value=\"option.value || option\" @blur=\"onBlur\" @focus=\"onFocus\" @click=\"onClick\" @change=\"onChange\" @keyup=\"onKeyup\" @keydown=\"onKeydown\" v-formly-atts=\"to.atts\">\n {{option.label || option}}\n </label>\n \n</div>\n";
822+
module.exports = "\n<div class=\"checkbox formly-list\" :id=\"to.id\" :class=\"to.classes\">\n\n <label v-for=\"option in field.options\">\n <input v-if=\"!to.inputType || to.inputType == 'checkbox'\" type=\"checkbox\" v-model=\"model[field.key]\" :value=\"option.value || option\" @blur=\"onBlur\" @focus=\"onFocus\" @click=\"onClick\" @change=\"onChange\" @keyup=\"onKeyup\" @keydown=\"onKeydown\" v-formly-atts=\"to.atts\">\n <input v-if=\"to.inputType == 'radio'\" type=\"radio\" v-model=\"model[field.key]\" :value=\"option.value || option\" @blur=\"onBlur\" @focus=\"onFocus\" @click=\"onClick\" @change=\"onChange\" @keyup=\"onKeyup\" @keydown=\"onKeydown\" v-formly-atts=\"to.atts\">\n {{option.label || option}}\n </label>\n \n</div>\n";
823823

824824
/***/ },
825825
/* 45 */

0 commit comments

Comments
 (0)