File tree Expand file tree Collapse file tree 5 files changed +10
-3
lines changed Expand file tree Collapse file tree 5 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 18
18
<el-form-item label =" 简介" >
19
19
<Editor v-model =" formData.description" :min-height =" 192" />
20
20
</el-form-item >
21
+ <!-- TODO @puhui999:头像应该是 imageupload 组件 -->
21
22
<el-form-item label =" 头像" prop =" avatar" >
22
23
<el-input v-model =" formData.avatar" placeholder =" 请输入头像" />
23
24
</el-form-item >
@@ -90,9 +91,9 @@ export default {
90
91
this .formLoading = true ;
91
92
try {
92
93
const that = this ;
93
- let data = this .formData ;
94
+ let data = this .formData ; // TODO @puhui999:const data
94
95
95
- this .getRef (" formRef" ).validate (valid => {
96
+ this .getRef (" formRef" ).validate (valid => { // TODO @puhui999:上面不用空行;
96
97
if (! valid) {
97
98
return ;
98
99
}
@@ -116,6 +117,7 @@ export default {
116
117
this .formLoading = false
117
118
}
118
119
},
120
+ // TODO @puhui999:这个在研究下,看看有没办法回到 $refs
119
121
getRef (refName ){ // TODO puhui999: 获得表单 ref,提取出来的目的呢是解决 $ 在 if 中 end闭合不了的问题,代码生成后可删除此方法
120
122
return this .$refs [refName]
121
123
},
Original file line number Diff line number Diff line change 86
86
@pagination =" getList" />
87
87
<!-- 对话框(添加 / 修改) -->
88
88
<Demo03StudentForm ref =" formRef" @success =" getList" />
89
- <!-- 子表的列表 -->
89
+ <!-- 子表的列表 --> <!-- TODO @puhui999:Demo03CourseList 和 Demo03GradeList 是不是不要有边距,应该和上面列表一样,是顶格的 -->
90
90
<el-tabs v-model =" subTabsName" >
91
91
<el-tab-pane label =" 学生课程" name =" demo03Course" >
92
92
<Demo03CourseList v-if =" currentRow.id" :student-id =" currentRow.id" />
Original file line number Diff line number Diff line change 39
39
</el-row >
40
40
41
41
<el-table v-loading =" loading" :data =" list" :stripe =" true" :show-overflow-tooltip =" true" >
42
+ <!-- TODO @puhui999:居中没生效 -->
42
43
<!-- 子表的列表 -->
43
44
<el-table-column type =" expand" >
44
45
<template #default =" scope " >
@@ -157,6 +158,7 @@ export default {
157
158
},
158
159
/** 添加/修改操作 */
159
160
openForm (id ) {
161
+ // TODO @puhui999:$refs 在 vm 里面怎么写,可以看看这里噢。
160
162
this .$refs [" formRef" ].open (id);
161
163
},
162
164
/** 删除按钮操作 */
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ export default {
103
103
const that = this ;
104
104
let data = this .formData ;
105
105
let validate = false ;
106
+ // TODO @puhui999:要不要改成 await 风格;
106
107
// 校验主表
107
108
this .getRef (" formRef" ).validate (valid => {
108
109
validate = valid;
Original file line number Diff line number Diff line change 31
31
</el-table-column >
32
32
</el-table >
33
33
</el-form >
34
+ <!-- TODO @puhui999:居中没生效 -->
34
35
<el-row justify =" center" class =" mt-3" >
35
36
<el-button @click =" handleAdd" round >+ 添加学生课程</el-button >
36
37
</el-row >
@@ -72,6 +73,7 @@ export default {
72
73
}
73
74
try {
74
75
this .formLoading = true ;
76
+ // TODO @puhui999:涉及到 that 的地方,看看怎么都改成 this
75
77
const that = this ;
76
78
Demo03StudentApi .getDemo03CourseListByStudentId (val).then (res => {
77
79
that .formData = res .data ;
You can’t perform that action at this time.
0 commit comments