Showing
1 changed file
with
4 additions
and
4 deletions
... | ... | @@ -201,9 +201,9 @@ |
201 | 201 | if (!isJpgOrPng) { |
202 | 202 | createMessage.error('只能上传图片文件!'); |
203 | 203 | } |
204 | - const isLt2M = (file.size as number) / 1024 / 1024 < 5; | |
204 | + const isLt2M = (file.size as number) / 1024 / 1024 < 2; | |
205 | 205 | if (!isLt2M) { |
206 | - createMessage.error('图片大小不能超过5MB!'); | |
206 | + createMessage.error('图片大小不能超过2MB!'); | |
207 | 207 | } |
208 | 208 | return isJpgOrPng && isLt2M; |
209 | 209 | }; |
... | ... | @@ -234,9 +234,9 @@ |
234 | 234 | if (!isJpgOrPng) { |
235 | 235 | createMessage.error('只能上传图片文件!'); |
236 | 236 | } |
237 | - const isLt2M = (file.size as number) / 1024 / 1024 < 5; | |
237 | + const isLt2M = (file.size as number) / 1024 / 1024 < 3; | |
238 | 238 | if (!isLt2M) { |
239 | - createMessage.error('图片大小不能超过5MB!'); | |
239 | + createMessage.error('图片大小不能超过3MB!'); | |
240 | 240 | } |
241 | 241 | return isJpgOrPng && isLt2M; |
242 | 242 | }; | ... | ... |