图片可以上传gif

This commit is contained in:
夕阳微笑1 2024-12-24 15:08:44 +08:00
parent e69d5528ad
commit b5bdf3b548

View File

@ -420,7 +420,7 @@ const disabled = ref(false)
const handleChange: UploadProps['onChange'] = async (file: uploadFile, uploadFiles) => {
state.formData.loading = true;
if (file.raw.type === 'image/png' || file.raw.type === 'image/jpeg' || file.raw.type === 'image/jpg') {
if (file.raw.type === 'image/png' || file.raw.type === 'image/jpeg' || file.raw.type === 'image/jpg' || file.raw.type === 'image/gif') {
state.formData.fileList = uploadFiles;
uploadDisabled.value = true;
try {