update: catch
This commit is contained in:
parent
1b2ded7421
commit
0e3eb887da
@ -97,10 +97,14 @@ async function init() {
|
||||
return;
|
||||
}
|
||||
// 判断是否为正常访问的图片
|
||||
try {
|
||||
const resp = await fetch(props.src);
|
||||
if (resp.status !== 200) {
|
||||
emit('readyError');
|
||||
}
|
||||
} catch {
|
||||
emit('readyError');
|
||||
}
|
||||
cropper.value = new Cropper(imgEl, {
|
||||
...defaultOptions,
|
||||
crop() {
|
||||
|
Loading…
Reference in New Issue
Block a user