Commit 5e0cf7dca03a694f3c68c34ff3c0aa57652f3e64

Authored by fengtao
1 parent f38ea10d

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

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