We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c36802 commit ec9c70aCopy full SHA for ec9c70a
1 file changed
generator/templates/Crud/src/components/Resource.vue
@@ -214,8 +214,7 @@ export default {
214
this.beforeOpenCreate(selected);
215
}
216
if (this.modelType) {
217
- const Model = this.modelType()
218
- this.createForm.values = new Model;
+ this.createForm.values = new this.modelType();
219
220
},
221
beforeOpenUpdateHandler(selected) {
@@ -227,10 +226,7 @@ export default {
227
226
this.updateForm.values = selected[0];
228
return;
229
230
-
231
232
- const instance = new Model
233
- this.updateForm.values = instance.mapResponse(selected[0]);
+ this.updateForm.values = new this.modelType().mapResponse(selected[0]);
234
235
236
};
0 commit comments