Skip to content

Commit ec9c70a

Browse files
committed
revert(resource): reverted component to original state
1 parent 6c36802 commit ec9c70a

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

generator/templates/Crud/src/components/Resource.vue

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,7 @@ export default {
214214
this.beforeOpenCreate(selected);
215215
}
216216
if (this.modelType) {
217-
const Model = this.modelType()
218-
this.createForm.values = new Model;
217+
this.createForm.values = new this.modelType();
219218
}
220219
},
221220
beforeOpenUpdateHandler(selected) {
@@ -227,10 +226,7 @@ export default {
227226
this.updateForm.values = selected[0];
228227
return;
229228
}
230-
231-
const Model = this.modelType()
232-
const instance = new Model
233-
this.updateForm.values = instance.mapResponse(selected[0]);
229+
this.updateForm.values = new this.modelType().mapResponse(selected[0]);
234230
},
235231
},
236232
};

0 commit comments

Comments
 (0)