This commit is contained in:
@@ -231,7 +231,7 @@
|
||||
<a-form-item label="微信二维码" name="wechatQrCode">
|
||||
<div class="wechat-qr-field">
|
||||
<a-upload
|
||||
accept="image/*"
|
||||
accept="image/jpeg,image/png,image/webp"
|
||||
:show-upload-list="false"
|
||||
:before-upload="beforeUploadWechatQr"
|
||||
:custom-request="handleWechatQrUpload"
|
||||
@@ -658,9 +658,9 @@ const handlePhoneFocus = () => {
|
||||
|
||||
/** beforeUploadWechatQr validates QR image files before upload. */
|
||||
const beforeUploadWechatQr = (file: File) => {
|
||||
const isImage = file.type.startsWith('image/')
|
||||
const isImage = file.type.startsWith('image/') && file.type !== 'image/gif'
|
||||
if (!isImage) {
|
||||
message.error('只能上传图片文件')
|
||||
message.error('二维码仅支持 JPG、PNG 或 WebP 图片')
|
||||
}
|
||||
return isImage
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user