Pre Merge pull request !286 from 任伟x/3.x

This commit is contained in:
任伟x 2024-05-27 08:27:24 +00:00 committed by Gitee
commit 2641c414e3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 23 additions and 0 deletions

View File

@ -148,6 +148,29 @@ ImageKnifeComponent({ ImageKnifeOption:
}).width(100).height(100)
```
#### 8.监听图片加载成功与失败
```
ImageKnifeComponent({ ImageKnifeOption:
{
loadSrc: $r("app.media.rabbit"),
onLoadListener:{
onLoadStart:()=>{
this.starTime = new Date().getTime()
console.info("Load start: ");
},
onLoadFailed: (err) => {
console.error("Load Failed Reason: " + err + " cost " + (new Date().getTime() - this.starTime) + " milliseconds");
},
onLoadSuccess: (data) => {
console.info("Load Successful: cost " + (new Date().getTime() - this.starTime) + " milliseconds");
return data;
},
}
}
}).width(100).height(100)
```
## 接口说明
### ImageKnifeOption参数列表