提交 3a8cdc80 编写于 作者: W w00584494

add image onComplete property doc

Signed-off-by: Nw00584494 <wangqiangqiang10@huawei.com>
Change-Id: I80e35a8043c5227fc9ba09731a9b267ec80a17ae
上级 c100820a
......@@ -83,7 +83,7 @@ Image(src: PixelMap | ResourceStr | DrawableDescriptor)
| 名称 | 功能描述 |
| ---------------------------------------- | ---------------------------------------- |
| onComplete(callback:&nbsp;(event?:&nbsp;{&nbsp;width:&nbsp;number,&nbsp;height:&nbsp;number,&nbsp;componentWidth:&nbsp;number,<br>&nbsp;componentHeight:&nbsp;number,&nbsp;loadingStatus:&nbsp;number&nbsp;})&nbsp;=&gt;&nbsp;void) | 图片成功加载时触发该回调,返回成功加载的图片尺寸。<br>- width:图片的宽,单位为像素。<br/>- height:图片的高,单位为像素。<br/>- componentWidth:组件的宽,单位为像素。<br/>- componentHeight:组件的高,单位为像素。<br/>- loadingStatus:图片加载成功的状态。<br/>从API version 9开始,该接口支持在ArkTS卡片中使用。<br/>**说明:** <br/>loadingStatus返回的状态值为0时,代表图片加载失败;返回的状态值为1时,代表图片加载成功。 |
| onComplete(callback:&nbsp;(event?:&nbsp;{&nbsp;width:&nbsp;number,&nbsp;height:&nbsp;number,&nbsp;<br/> componentWidth:&nbsp;number,&nbsp;componentHeight:&nbsp;number,&nbsp;<br/>loadingStatus:&nbsp;number&nbsp;,contentWidth<sup>10+</sup>:&nbsp;number,&nbsp;<br/>contentHeight<sup>10+</sup>:&nbsp;number,&nbsp;contentOffsetX<sup>10+</sup>:&nbsp;number,&nbsp;<br/>contentOffsetY<sup>10+</sup>:&nbsp;number})&nbsp;=&gt;&nbsp;void) | 图片成功加载时触发该回调,返回成功加载的图片尺寸。<br>- width:图片的宽,单位为像素。<br/>- height:图片的高,单位为像素。<br/>- componentWidth:组件的宽,单位为像素。<br/>- componentHeight:组件的高,单位为像素。<br/>- loadingStatus:图片加载成功的状态。<br/>- contentWidth:图片实际绘制的宽度,单位为像素。<br/>- contentHeight:图片实际绘制的高度,单位为像素。<br/>- contentOffsetX:实际绘制内容相对于组件自身的x轴偏移,单位为像素。<br/>- contentOffsetY:实际绘制内容相对于组件自身的y轴偏移,单位为像素。<br/>从API version 9开始,该接口支持在ArkTS卡片中使用。<br/>**说明:** <br/>loadingStatus返回的状态值为0时,代表图片加载失败;返回的状态值为1时,代表图片加载成功, API version 10新增属性仅在loadingStatus返回1时有效。 |
| onError(callback:&nbsp;(event?:&nbsp;{&nbsp;componentWidth:&nbsp;number,&nbsp;componentHeight:&nbsp;number&nbsp;, message<sup>9+</sup>: string })&nbsp;=&gt;&nbsp;void) | 图片加载出现异常时触发该回调。<br>- componentWidth:组件的宽,单位为像素。<br/>- componentHeight:组件的高,单位为像素。<br/>从API version 9开始,该接口支持在ArkTS卡片中使用。 |
| onFinish(event:&nbsp;()&nbsp;=&gt;&nbsp;void) | 当加载的源文件为带动效的svg图片时,当svg动效播放完成时会触发这个回调,如果动效为无限循环动效,则不会触发这个回调。<br/>从API version 9开始,该接口支持在ArkTS卡片中使用。 |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册