Skip to content

Commit 2c2fa95

Browse files
YunaiVgitee-org
authored andcommitted
!3 代码生成:vue2 生成示例代码格式调整
Merge pull request !3 from puhui999/master
2 parents f65a367 + a9099a2 commit 2c2fa95

20 files changed

+64
-71
lines changed

src/views/infra/demo/demo01/Demo01ContactForm.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</template>
3232

3333
<script>
34-
import * as Demo01ContactApi from '@/api/infra/demo01'
34+
import * as Demo01ContactApi from '@/api/infra/demo01';
3535
import ImageUpload from '@/components/ImageUpload';
3636
import Editor from '@/components/Editor';
3737
export default {
@@ -104,8 +104,7 @@ export default {
104104
this.$modal.msgSuccess("新增成功");
105105
this.dialogVisible = false;
106106
this.$emit('success');
107-
// TODO @puhui999:少了一个空格
108-
}finally {
107+
} finally {
109108
this.formLoading = false;
110109
}
111110
},

src/views/infra/demo/demo01/index.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<template>
22
<div class="app-container">
3-
43
<!-- 搜索工作栏 -->
54
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
65
<el-form-item label="名字" prop="name">
@@ -149,7 +148,7 @@ export default {
149148
await this.$modal.confirm('是否确认删除示例联系人编号为"' + id + '"的数据项?')
150149
try {
151150
await Demo01ContactApi.deleteDemo01Contact(id);
152-
this.getList();
151+
await this.getList();
153152
this.$modal.msgSuccess("删除成功");
154153
} catch {}
155154
},

src/views/infra/demo/demo02/Demo02CategoryForm.vue

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
<el-input v-model="formData.name" placeholder="请输入名字" />
88
</el-form-item>
99
<el-form-item label="父级编号" prop="parentId">
10-
<!-- TODO puhui999:这里下面应该是 2 个空格 -->
1110
<TreeSelect
12-
v-model="formData.parentId"
13-
:options="demo02CategoryTree"
14-
:normalizer="normalizer"
15-
placeholder="请选择父级编号"
11+
v-model="formData.parentId"
12+
:options="demo02CategoryTree"
13+
:normalizer="normalizer"
14+
placeholder="请选择父级编号"
1615
/>
1716
</el-form-item>
1817
</el-form>
@@ -25,7 +24,7 @@
2524
</template>
2625

2726
<script>
28-
import * as Demo02CategoryApi from '@/api/infra/demo02'
27+
import * as Demo02CategoryApi from '@/api/infra/demo02';
2928
import TreeSelect from "@riophae/vue-treeselect";
3029
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
3130
export default {
@@ -72,8 +71,7 @@ export default {
7271
}
7372
}
7473
this.title = "新增示例分类";
75-
// TODO @puhui999:这里少了一个 await
76-
this.getDemo02CategoryTree();
74+
await this.getDemo02CategoryTree();
7775
},
7876
/** 提交按钮 */
7977
async submitForm() {
@@ -95,7 +93,7 @@ export default {
9593
this.$modal.msgSuccess("新增成功");
9694
this.dialogVisible = false;
9795
this.$emit('success');
98-
}finally {
96+
} finally {
9997
this.formLoading = false;
10098
}
10199
},

src/views/infra/demo/demo02/index.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<template>
22
<div class="app-container">
3-
43
<!-- 搜索工作栏 -->
54
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
65
<el-form-item label="名字" prop="name">
@@ -37,7 +36,6 @@
3736
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
3837
</el-row>
3938

40-
<!-- TODO puhui999:这里下面应该是 2 个空格 -->
4139
<el-table
4240
v-loading="loading"
4341
:data="list"
@@ -136,7 +134,7 @@ export default {
136134
await this.$modal.confirm('是否确认删除示例分类编号为"' + id + '"的数据项?')
137135
try {
138136
await Demo02CategoryApi.deleteDemo02Category(id);
139-
this.getList();
137+
await this.getList();
140138
this.$modal.msgSuccess("删除成功");
141139
} catch {}
142140
},

src/views/infra/demo/demo03/erp/Demo03StudentForm.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</template>
3030

3131
<script>
32-
import * as Demo03StudentApi from '@/api/infra/demo03-erp'
32+
import * as Demo03StudentApi from '@/api/infra/demo03-erp';
3333
import Editor from '@/components/Editor';
3434
export default {
3535
name: "Demo03StudentForm",
@@ -99,7 +99,7 @@ export default {
9999
this.$modal.msgSuccess("新增成功");
100100
this.dialogVisible = false;
101101
this.$emit('success');
102-
}finally {
102+
} finally {
103103
this.formLoading = false;
104104
}
105105
},

src/views/infra/demo/demo03/erp/components/Demo03CourseForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</template>
2020

2121
<script>
22-
import * as Demo03StudentApi from '@/api/infra/demo03-erp'
22+
import * as Demo03StudentApi from '@/api/infra/demo03-erp';
2323
export default {
2424
name: "Demo03CourseForm",
2525
components: {

src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
</template>
3535

3636
<script>
37-
import * as Demo03StudentApi from '@/api/infra/demo03-erp'
38-
import Demo03CourseForm from './Demo03CourseForm.vue'
37+
import * as Demo03StudentApi from '@/api/infra/demo03-erp';
38+
import Demo03CourseForm from './Demo03CourseForm.vue';
3939
export default {
4040
name: "Demo03CourseList",
4141
components: {

src/views/infra/demo/demo03/erp/components/Demo03GradeForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</template>
2020

2121
<script>
22-
import * as Demo03StudentApi from '@/api/infra/demo03-erp'
22+
import * as Demo03StudentApi from '@/api/infra/demo03-erp';
2323
export default {
2424
name: "Demo03GradeForm",
2525
components: {

src/views/infra/demo/demo03/erp/components/Demo03GradeList.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
</template>
3535

3636
<script>
37-
import * as Demo03StudentApi from '@/api/infra/demo03-erp'
38-
import Demo03GradeForm from './Demo03GradeForm.vue'
37+
import * as Demo03StudentApi from '@/api/infra/demo03-erp';
38+
import Demo03GradeForm from './Demo03GradeForm.vue';
3939
export default {
4040
name: "Demo03GradeList",
4141
components: {

src/views/infra/demo/demo03/erp/index.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<template>
22
<div class="app-container">
3-
43
<!-- 搜索工作栏 -->
54
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
65
<el-form-item label="名字" prop="name">
@@ -93,8 +92,8 @@
9392
<script>
9493
import * as Demo03StudentApi from '@/api/infra/demo03-erp';
9594
import Demo03StudentForm from './Demo03StudentForm.vue';
96-
import Demo03CourseList from './components/Demo03CourseList.vue'
97-
import Demo03GradeList from './components/Demo03GradeList.vue'
95+
import Demo03CourseList from './components/Demo03CourseList.vue';
96+
import Demo03GradeList from './components/Demo03GradeList.vue';
9897
export default {
9998
name: "Demo03Student",
10099
components: {
@@ -169,7 +168,7 @@ export default {
169168
await this.$modal.confirm('是否确认删除学生编号为"' + id + '"的数据项?')
170169
try {
171170
await Demo03StudentApi.deleteDemo03Student(id);
172-
this.getList();
171+
await this.getList();
173172
this.$modal.msgSuccess("删除成功");
174173
} catch {}
175174
},

0 commit comments

Comments
 (0)