Commit 556a23ed by xinla

--no commit message

1 parent 769453ca
...@@ -89,6 +89,7 @@ export default { ...@@ -89,6 +89,7 @@ export default {
} }
if (this.maxImgPx) { if (this.maxImgPx) {
try {
await new Promise((resolve) => { await new Promise((resolve) => {
let width, height let width, height
let image = new Image() let image = new Image()
...@@ -107,7 +108,7 @@ export default { ...@@ -107,7 +108,7 @@ export default {
resolve() resolve()
} }
if (window.URL) { if (window.URL) {
url = window.URL.createObjectURL(file) let url = window.URL.createObjectURL(file)
image.src = url image.src = url
} else if (window.FileReader) { } else if (window.FileReader) {
let reader = new FileReader() let reader = new FileReader()
...@@ -118,6 +119,9 @@ export default { ...@@ -118,6 +119,9 @@ export default {
reader.readAsDataURL(file) reader.readAsDataURL(file)
} }
}) })
} catch (e) {
console.error(e)
}
} }
} else if (this.type === '1') { } else if (this.type === '1') {
// 语音 // 语音
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!