Commit 8c1ce562e9ffb79fc0231eb49a1725a74fb1c953

Authored by fengtao
1 parent f23f07bc

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

@@ -201,9 +201,9 @@ @@ -201,9 +201,9 @@
201 if (!isJpgOrPng) { 201 if (!isJpgOrPng) {
202 createMessage.error('只能上传图片文件!'); 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 if (!isLt2M) { 205 if (!isLt2M) {
206 - createMessage.error('图片大小不能超过5MB!'); 206 + createMessage.error('图片大小不能超过2MB!');
207 } 207 }
208 return isJpgOrPng && isLt2M; 208 return isJpgOrPng && isLt2M;
209 }; 209 };
@@ -234,9 +234,9 @@ @@ -234,9 +234,9 @@
234 if (!isJpgOrPng) { 234 if (!isJpgOrPng) {
235 createMessage.error('只能上传图片文件!'); 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 if (!isLt2M) { 238 if (!isLt2M) {
239 - createMessage.error('图片大小不能超过5MB!'); 239 + createMessage.error('图片大小不能超过3MB!');
240 } 240 }
241 return isJpgOrPng && isLt2M; 241 return isJpgOrPng && isLt2M;
242 }; 242 };