优惠券相关管理功能实现
This commit is contained in:
@@ -242,15 +242,15 @@ const handleEditProfile = () => {
|
||||
|
||||
const beforeUploadAvatar: UploadProps['beforeUpload'] = (file) => {
|
||||
const isImage = file.type.startsWith('image/')
|
||||
const isLt2M = file.size / 1024 / 1024 < 2
|
||||
const isLt20M = file.size / 1024 / 1024 < 20
|
||||
|
||||
if (!isImage) {
|
||||
message.error('只能上传图片文件!')
|
||||
}
|
||||
if (!isLt2M) {
|
||||
message.error('图片大小不能超过 2MB!')
|
||||
if (!isLt20M) {
|
||||
message.error('图片大小不能超过 20MB!')
|
||||
}
|
||||
return isImage && isLt2M
|
||||
return isImage && isLt20M
|
||||
}
|
||||
|
||||
const handleAvatarUpload = async (options: any) => {
|
||||
|
||||
Reference in New Issue
Block a user