Commit 5e0cf7dca03a694f3c68c34ff3c0aa57652f3e64

Authored by fengtao
1 parent f38ea10d

fix:修改企业定制表单验证和上传图片大于5m还显示问题

@@ -123,7 +123,7 @@ export const schemas: FormSchema[] = [ @@ -123,7 +123,7 @@ export const schemas: FormSchema[] = [
123 field: 'prov', 123 field: 'prov',
124 label: '所在城市', 124 label: '所在城市',
125 required: true, 125 required: true,
126 - component: 'Input', 126 + component: 'Select',
127 colProps: { 127 colProps: {
128 span: 24, 128 span: 24,
129 }, 129 },
@@ -172,7 +172,7 @@ export const schemas: FormSchema[] = [ @@ -172,7 +172,7 @@ export const schemas: FormSchema[] = [
172 field: 'qrcode', 172 field: 'qrcode',
173 label: '联系我们', 173 label: '联系我们',
174 required: true, 174 required: true,
175 - component: 'Input', 175 + component: 'Select',
176 colProps: { 176 colProps: {
177 span: 24, 177 span: 24,
178 }, 178 },
@@ -62,6 +62,7 @@ @@ -62,6 +62,7 @@
62 @preview="handlePreview" 62 @preview="handlePreview"
63 :customRequest="customUploadHomeSwiper" 63 :customRequest="customUploadHomeSwiper"
64 :before-upload="beforeUploadHomeSwiper" 64 :before-upload="beforeUploadHomeSwiper"
  65 + @change="handleChange"
65 > 66 >
66 <div v-if="fileList.length < 5"> 67 <div v-if="fileList.length < 5">
67 <div style="margin-top: 1.875rem"> 68 <div style="margin-top: 1.875rem">
@@ -147,9 +148,6 @@ @@ -147,9 +148,6 @@
147 previewImage.value = file.url || file.preview; 148 previewImage.value = file.url || file.preview;
148 previewVisible.value = true; 149 previewVisible.value = true;
149 }; 150 };
150 - const handleChange = ({ fileList: newFileList }: FileInfo) => {  
151 - fileList.value = newFileList;  
152 - };  
153 151
154 // logo图片上传 152 // logo图片上传
155 const logoPic = ref(); 153 const logoPic = ref();
@@ -232,6 +230,11 @@ @@ -232,6 +230,11 @@
232 } 230 }
233 return isJpgOrPng && isLt2M; 231 return isJpgOrPng && isLt2M;
234 }; 232 };
  233 + const handleChange = (info: FileInfo) => {
  234 + if (info.file.status !== 'uploading') {
  235 + fileList.value = info.fileList.filter((f: any) => !f.size);
  236 + }
  237 + };
235 238
236 const handleUpdateInfo = async () => { 239 const handleUpdateInfo = async () => {
237 try { 240 try {