82
82
watch: {
83
83
// new model loaded
84
84
model : function (newModel , oldModel ) {
85
- if (oldModel == newModel) // model got a new property, skip
85
+ if (oldModel == newModel) // model property changed , skip
86
86
return ;
87
87
88
88
if (newModel != null ) {
89
89
this .$nextTick (() => {
90
-
91
- // console.log("Model changed!", oldModel, newModel);
92
90
// Model changed!
93
91
if (this .options .validateAfterLoad === true && this .isNewModel !== true )
94
92
this .validate ();
@@ -197,13 +195,11 @@ div
197
195
198
196
// Validating the model properties
199
197
validate () {
200
- // console.log("Validate!", this.model);
201
198
this .clearValidationErrors ();
202
199
203
200
each (this .$children , (child ) => {
204
201
if (isFunction (child .validate ))
205
202
{
206
- // console.log("Validate ", child.model)
207
203
let err = child .validate ();
208
204
each (err, (err ) => {
209
205
this .errors .push ({
@@ -225,12 +221,15 @@ div
225
221
child .clearValidationErrors ();
226
222
});
227
223
},
224
+
228
225
modelUpdated (newVal , schema ){
229
226
this .$emit (" model-updated" , newVal, schema);
230
227
},
228
+
231
229
buttonVisibility (field ) {
232
230
return field .buttons && field .buttons .length > 0 ;
233
231
},
232
+
234
233
errorsVisibility (field ) {
235
234
return field .errors && field .errors .length > 0 ;
236
235
}
0 commit comments