fix:#800
修复了自动化代码公用字典出现多次创建字典相关代码的bug
This commit is contained in:
@@ -49,10 +49,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
type: '',
|
||||
{{- range .Fields}}
|
||||
{{- if .DictType }}
|
||||
{{ .DictType }}Options: [],
|
||||
{{- end }}
|
||||
{{- range $index, $element := .DictTypes}}
|
||||
{{ $element }}Options: [],
|
||||
{{- end }}
|
||||
formData: {
|
||||
{{- range .Fields}}
|
||||
@@ -86,10 +84,8 @@ export default {
|
||||
} else {
|
||||
this.type = 'create'
|
||||
}
|
||||
{{- range .Fields }}
|
||||
{{- if .DictType }}
|
||||
await this.getDict('{{.DictType}}')
|
||||
{{- end }}
|
||||
{{- range $index, $element := .DictTypes }}
|
||||
await this.getDict('{{$element}}')
|
||||
{{- end }}
|
||||
},
|
||||
methods: {
|
||||
|
@@ -144,10 +144,8 @@ export default {
|
||||
type: '',
|
||||
deleteVisible: false,
|
||||
multipleSelection: [],
|
||||
{{- range .Fields}}
|
||||
{{- if .DictType }}
|
||||
{{ .DictType }}Options: [],
|
||||
{{- end }}
|
||||
{{- range $index, $element := .DictTypes }}
|
||||
{{ $element }}Options: [],
|
||||
{{- end }}
|
||||
formData: {
|
||||
{{- range .Fields}}
|
||||
@@ -172,10 +170,8 @@ export default {
|
||||
},
|
||||
async created() {
|
||||
await this.getTableData()
|
||||
{{- range .Fields }}
|
||||
{{- if .DictType }}
|
||||
await this.getDict('{{.DictType}}')
|
||||
{{- end }}
|
||||
{{- range $index, $element := .DictTypes }}
|
||||
await this.getDict('{{$element}}')
|
||||
{{- end }}
|
||||
},
|
||||
methods: {
|
||||
|
Reference in New Issue
Block a user