docs📝: 修改接口文档
This commit is contained in:
1 parent
0607d462d0
commit
3fd34db3c1
16 files changed
+541
-289
No files matched your search
@@ -54,7 +54,7 @@ func (s *{{.ClassName}}Control) Generate(model *models.SysConfig) {
|
||||
{{$x := .Pk}}
|
||||
{{- if ($x) }}
|
||||
if s.{{.GoField}} == 0 {
|
||||
model.Model = common.Model{{{.GoField}}: s.{{.GoField}}}
|
||||
model.Model = common.Model{ {{.GoField}}: s.{{.GoField}} }
|
||||
}
|
||||
{{- else if eq .GoField "CreatedAt" -}}
|
||||
{{- else if eq .GoField "UpdatedAt" -}}
|
||||
|
||||
@@ -223,7 +223,6 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<FileChoose ref="fileChoose" :dialog-form-visible="fileOpen" @confirm="getImgList" @close="fileClose" />
|
||||
</el-card>
|
||||
</template>
|
||||
</BasicLayout>
|
||||
@@ -233,17 +232,13 @@
|
||||
import {add{{.ClassName}}, del{{.ClassName}}, get{{.ClassName}}, list{{.ClassName}}, update{{.ClassName}}} from '@/api/{{ .BusinessName}}'
|
||||
{{range .Columns}}
|
||||
{{- if ne .FkTableName "" -}}
|
||||
import {list{{.FkTableNameClass}} } from '@/api/{{ .FkTableNamePackage}}'
|
||||
|
||||
import {list{{.FkTableNameClass}} } from '@/api/{{ .FkTableNamePackage}}'
|
||||
{{ end -}}
|
||||
{{- end -}}
|
||||
|
||||
import FileChoose from '@/components/FileChoose'
|
||||
|
||||
export default {
|
||||
name: '{{.ClassName}}',
|
||||
components: {
|
||||
FileChoose
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -262,8 +257,6 @@
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
isEdit: false,
|
||||
fileOpen: false,
|
||||
fileIndex: undefined,
|
||||
// 类型数据字典
|
||||
typeOptions: [],
|
||||
{{.ModuleName}}List: [],
|
||||
@@ -296,10 +289,7 @@
|
||||
{{- range .Columns -}}
|
||||
{{- $x := .IsQuery -}}
|
||||
{{- if (eq $x "1") -}}
|
||||
{{.JsonField}}:
|
||||
[
|
||||
{required: true, message: '{{.ColumnComment}}不能为空', trigger: 'blur'}
|
||||
],
|
||||
{{.JsonField}}: [ {required: true, message: '{{.ColumnComment}}不能为空', trigger: 'blur'} ],
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
}
|
||||
@@ -309,15 +299,12 @@
|
||||
this.getList()
|
||||
{{range .Columns}}
|
||||
{{- if ne .DictType "" -}}
|
||||
|
||||
this.getDicts('{{.DictType}}').then(response => {
|
||||
this.{{.JsonField}}Options = response.data
|
||||
})
|
||||
|
||||
{{ end -}}
|
||||
{{- if ne .FkTableName "" -}}
|
||||
this.get{{.FkTableNameClass}}Items()
|
||||
|
||||
{{ end -}}
|
||||
{{- end -}}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user