Coloey
Results
1
comments of
Coloey
```js function loadImg(src){ new Promise((resolve,reject)=>{ let img = new Image() img.onload=function(){ console.log("图片加载成功") resolve(img) } img.error=function(){ reject(new Error(`Can not load ${src}`)) } img.src=src }) } function timeout(){ return new Promise((reject)=>{ setTimeout(()=>{...