|
|
@@ -298,7 +298,8 @@ const beforeReadImage = async (
|
|
|
if (isHeicFile) {
|
|
|
try {
|
|
|
const convertedFile = await convertHeicHeifToWebp(f)
|
|
|
- normalizedFiles.push(convertedFile)
|
|
|
+ const image = await smartCompressImage(convertedFile)
|
|
|
+ normalizedFiles.push(image)
|
|
|
} catch (error) {
|
|
|
console.error('HEIC/HEIF 转换失败:', error)
|
|
|
showFailToast('HEIC/HEIF 转换失败,请使用 JPG/PNG/WEBP 格式')
|
|
|
@@ -306,8 +307,8 @@ const beforeReadImage = async (
|
|
|
}
|
|
|
continue
|
|
|
}
|
|
|
-
|
|
|
- normalizedFiles.push(f)
|
|
|
+ const image = await smartCompressImage(f)
|
|
|
+ normalizedFiles.push(image)
|
|
|
}
|
|
|
|
|
|
// 返回原始 File 数组 给 van-uploader 进行默认处理,
|