增加多图片自动生成功能

This commit is contained in:
piexlMax
2023-07-18 22:19:12 +08:00
parent 350ce2ad35
commit c618fcafaa
11 changed files with 130 additions and 10 deletions

View File

@@ -131,6 +131,14 @@
<el-image style="width: 100px; height: 100px" :src="getUrl(scope.row.{{.FieldJson}})" fit="cover"/>
</template>
</el-table-column>
{{- else if eq .FieldType "pictures" }}
<el-table-column label="{{.FieldDesc}}" width="200">
<template #default="scope">
<div class="multiple-img-box">
<el-image v-for="(item,index) in scope.row.{{.FieldJson}}" style="width: 80px; height: 80px" :src="getUrl(item)" fit="cover"/>
</div>
</template>
</el-table-column>
{{- else if eq .FieldType "file" }}
<el-table-column label="{{.FieldDesc}}" width="200">
<template #default="scope">
@@ -195,6 +203,9 @@
{{- if eq .FieldType "picture" }}
<SelectImage v-model="formData.{{ .FieldJson }}" />
{{- end }}
{{- if eq .FieldType "pictures" }}
<SelectImage v-model="formData.{{ .FieldJson }}" multiple />
{{- end }}
{{- if eq .FieldType "file" }}
<SelectFile v-model="formData.{{ .FieldJson }}" />
{{- end }}
@@ -266,6 +277,15 @@ const formData = ref({
{{- if eq .FieldType "float64" }}
{{.FieldJson}}: 0,
{{- end }}
{{- if eq .FieldType "picture" }}
{{.FieldJson}}: "",
{{- end }}
{{- if eq .FieldType "pictures" }}
{{.FieldJson}}: [],
{{- end }}
{{- if eq .FieldType "file" }}
{{.FieldJson}}: [],
{{- end }}
{{- end }}
})