绘图容错处理

This commit is contained in:
dongqing 2018-09-21 15:27:06 +08:00
parent 4a58892193
commit c3408a4802

View File

@ -134,7 +134,9 @@ Component({
view.sHeight = res.height; view.sHeight = res.height;
}, },
fail: (error) => { fail: (error) => {
console.error(`getImageInfo failed, ${JSON.stringify(error)}`); // 如果图片坏了,则直接置空,防止坑爹的 canvas 画崩溃了
view.url = "";
console.error(`getImageInfo ${view.url} failed, ${JSON.stringify(error)}`);
}, },
complete: () => { complete: () => {
completeCount++; completeCount++;