图片上传支持 GIF:管理端上传白名单对齐 GIF,小程序图片选择保留原图避免动图被压成静态
自动发布开发环境 Nacos 配置 / publish (push) Successful in 47s

This commit is contained in:
2026-11-08 00:27:37 +08:00
parent 771625d8cf
commit daae69c6a0
7 changed files with 12 additions and 9 deletions
@@ -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
}