const data=['你好啊','hello word','好像打错了','学习之路很漫长']
//改成图片文件路径 ./images/1.jpg
//这是我的异步调用函数
function say(url){
return new Promise((resolve,reject)=>{
const img= new Image();
img.src=url;
img.addEventListener('load',()=>{
resolve(url);
})
resolve(url)
})
}
data.forEach((v,j)=>{
const i=new Image();
i.src=v
say(v).then((url)=>{
i.src=url
})
})
//不知道对不对
ismyto
1.0.1 • Public • PublishedReadme
Keywords
nonePackage Sidebar
Install
npm i ismyto
Weekly Downloads
1
Version
1.0.1
License
ISC
Unpacked Size
1.02 kB
Total Files
3