feat:导出失败的问题
This commit is contained in:
1 parent
b765e84642
commit
925f25e9a6
2 files changed
+6
-3
No files matched your search
+4
-1
@@ -331,6 +331,7 @@ export function handleBlobFile(response: any, fileName: string) {
|
||||
blob = new Blob(safeData, { type: "application/octet-stream" })
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("导出错误", error)
|
||||
useMessage().error("文件数据格式错误")
|
||||
return
|
||||
}
|
||||
@@ -353,8 +354,10 @@ export function handleBlobFile(response: any, fileName: string) {
|
||||
"image/jpeg",
|
||||
"image/png",
|
||||
// "application/zip" // 添加 ZIP 文件类型支持
|
||||
"application/octet-stream"
|
||||
"application/octet-stream",
|
||||
"text/xml",
|
||||
]
|
||||
|
||||
if (!allowedTypes.includes(blob.type) && blob.type !== "") {
|
||||
useMessage().error("不支持的文件类型")
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user