mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
perf: 导入PPTX文件异常捕获
This commit is contained in:
parent
ae1ea94edc
commit
6461b1a059
@ -149,7 +149,15 @@ export default () => {
|
||||
|
||||
const reader = new FileReader()
|
||||
reader.onload = async e => {
|
||||
const json = await parse(e.target!.result as ArrayBuffer)
|
||||
let json = null
|
||||
try {
|
||||
json = await parse(e.target!.result as ArrayBuffer)
|
||||
}
|
||||
catch {
|
||||
exporting.value = false
|
||||
message.error('无法正确读取 / 解析该文件')
|
||||
return
|
||||
}
|
||||
|
||||
const ratio = 96 / 72
|
||||
const width = json.size.width
|
||||
|
Loading…
x
Reference in New Issue
Block a user