Back to Taro

taro-image-core

packages/taro-components/src/components/image/readme.md

4.2.02.7 KB
Original Source

taro-image-core

API

属性类型默认值说明
srcString图片资源地址
modeStringscaleToFill图片裁剪、缩放的模式
√(onError)binderrorHandleEvent当错误发生时,发布到 AppService 的事件名
√ (onLoad)bindloadHandleEvent当图片载入完毕时,发布到 AppService 的事件名
lazy-loadBooleanfalse图片懒加载。只针对 page 与 scroll-view 下的 image 有效
<!-- Auto Generated Below -->

Properties

PropertyAttributeDescriptionTypeDefault
lazyLoadlazy-loadbooleanfalse
modemode"aspectFill" | "aspectFit" | "bottom left" | "bottom right" | "bottom" | "center" | "heightFix" | "left" | "right" | "scaleToFill" | "top left" | "top right" | "top" | "widthFix"'scaleToFill'
nativeProps--{}{}
srcsrcstringundefined

Events

EventDescriptionType
errorCustomEvent<any>
loadCustomEvent<any>

Built with StencilJS