Commit 8c1ce562e9ffb79fc0231eb49a1725a74fb1c953

Authored by fengtao
1 parent f23f07bc

fix:DEFECT-577 576 575 限制图片大小提示

... ... @@ -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 };
... ...