constloadImageAsync=function(url){
return newPromise((resolve,reject)=>{
constimage=newImage()
image.=()=>{
resolve(image)
}
image.=()=>{
reject(image)
}
image.src=url
})
}
作者:方松潭
链接:https://www.jianshu.com/p/2af0c7702f76
constloadImageAsync=function(url){
return newPromise((resolve,reject)=>{
constimage=newImage()
image.=()=>{
resolve(image)
}
image.=()=>{
reject(image)
}
image.src=url
})
}
作者:方松潭
链接:https://www.jianshu.com/p/2af0c7702f76
相关阅读