This commit is contained in:
WangXiaoDong
2023-09-25 10:09:00 +08:00
parent 173f35042d
commit d9868d5cf0
37 changed files with 1618 additions and 1146 deletions

View File

@@ -88,11 +88,11 @@ export default defineComponent({
beforeUpload(file:any){
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg' || file.type === 'image/bmp';
if (!isJpgOrPng) {
message.error('You can only upload Image file!');
message.warning('You can only upload Image file!');
}
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
message.error('Image must smaller than 5MB!');
message.warning('Image must smaller than 2MB!');
}
return (isJpgOrPng && isLt2M) || Upload.LIST_IGNORE;
},