Commit 19f3d683f4bdee9f7165feac82bc7fa1891a5e51

Authored by ww
1 parent a4341e8d

fix: 修复上传部分表单上传图片约束类型

... ... @@ -11,6 +11,7 @@
11 11 <template #iconSelect>
12 12 <Upload
13 13 name="avatar"
  14 + accept=".png,.jpg,.jpeg,.gif"
14 15 list-type="picture-card"
15 16 class="avatar-uploader"
16 17 :show-upload-list="false"
... ...
... ... @@ -93,6 +93,7 @@ export const formSchema: FormSchema[] = [
93 93 return {
94 94 listType: 'picture-card',
95 95 maxFileLimit: 1,
  96 + accept: '.png,.jpg,.jpeg,.gif',
96 97 api: async (file: File) => {
97 98 try {
98 99 const formData = new FormData();
... ...
... ... @@ -59,6 +59,7 @@ export const formSchema: FormSchema[] = [
59 59 return {
60 60 listType: 'picture-card',
61 61 maxFileLimit: 1,
  62 + accept: '.png,.jpg,.jpeg,.gif',
62 63 api: async (file: File) => {
63 64 try {
64 65 const formData = new FormData();
... ...
... ... @@ -25,6 +25,7 @@
25 25 <template #iconSelect>
26 26 <Upload
27 27 name="avatar"
  28 + accept=".png,.jpg,.jpeg,.gif"
28 29 :show-upload-list="false"
29 30 list-type="picture-card"
30 31 class="avatar-uploader"
... ...
... ... @@ -5,6 +5,7 @@
5 5 <Upload
6 6 style="width: 20vw"
7 7 name="avatar"
  8 + accept=".png,.jpg,.jpeg,.gif"
8 9 list-type="picture-card"
9 10 class="avatar-uploader"
10 11 :show-upload-list="false"
... ...
... ... @@ -11,6 +11,7 @@
11 11 <template #iconSelect>
12 12 <Upload
13 13 name="avatar"
  14 + accept=".png,.jpg,.jpeg,.gif"
14 15 list-type="picture-card"
15 16 class="avatar-uploader"
16 17 :show-upload-list="false"
... ...