Skip to content

Commit 4956b5d

Browse files
authored
Merge pull request #36 from kingscode/KCI-156
KCI-156
2 parents 55898cb + 63446ff commit 4956b5d

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,15 @@ as you like in this plugins. The most important choices are:
5454
To test/develop the kingscode scaffold you can locally invoke this plugin.
5555
create a test project (`vue create scaffold-tester`) just like above.
5656

57+
browse to the scaffold-tester folder, which was just created.
58+
59+
install vuetify
60+
61+
`vue add vuetify`
62+
5763
install the cli-plugin locally
5864

59-
`npm install path\to\local\vue-cli-plugin-kingscode-scaffold`
65+
`npm i path\to\local\vue-cli-plugin-kingscode-scaffold`
6066

6167
invoke the plugin
6268

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
};

generator/templates/Default/src/plugins/vuetify/icons/kingscode.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ const identifiers = {
4747
fileExcel: ['fas', 'file-excel'],
4848
filePowerpoint: ['fas', 'file-powerpoint'],
4949
filePdf: ['fas', 'file-pdf'],
50+
51+
add: ['fas', 'plus'],
52+
plus: ['fas', 'plus'],
53+
minus: ['fas', 'minus'],
5054
};
5155

5256
export default {

generator/templates/Default/src/plugins/vuetify/icons/vuetify.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ const identifiers = {
9191
last: ['fas', 'step-forward'],
9292
unfold: ['fas', 'arrows-alt-v'],
9393
file: ['fas', 'paperclip'],
94-
plus: ['fas', 'plus'],
95-
minus: ['fas', 'minus'],
9694
};
9795

9896
export default { icons, identifiers, };

0 commit comments

Comments
 (0)