forked from floraachy/ImageKnife
新增Task任务报错10200006样例
Signed-off-by: zgf <zenggaofeng2@h-partners.com>
This commit is contained in:
parent
ddbff75a7d
commit
0c8a777c82
|
@ -36,6 +36,11 @@ struct Index {
|
|||
uri: 'pages/TestCommonImage',
|
||||
});
|
||||
})
|
||||
Button("测试占位图Task报错").margin({top:10}).onClick(()=>{
|
||||
router.push({
|
||||
uri: 'pages/TestTaskResourcePage',
|
||||
});
|
||||
})
|
||||
Button("测试HSP场景预加载").margin({top:10}).onClick(()=>{
|
||||
router.push({
|
||||
uri: 'pages/TestHspPreLoadImage',
|
||||
|
|
|
@ -16,10 +16,9 @@ import { ImageKnifeComponent, ImageKnifeOption } from "@ohos/libraryimageknife"
|
|||
|
||||
@ComponentV2
|
||||
export struct ZuImage {
|
||||
@Param src: PixelMap | ResourceStr | string | undefined
|
||||
@Param radius: BorderRadiuses | Length | LocalizedBorderRadiuses | undefined
|
||||
@Param placeholderSrc: PixelMap | ResourceStr | string | undefined
|
||||
@Param errorholderSrc: PixelMap | ResourceStr | string | undefined
|
||||
@Param @Require src: PixelMap | ResourceStr | string | undefined
|
||||
@Param @Require placeholderSrc: PixelMap | ResourceStr | string | undefined
|
||||
@Local errorholderSrc: PixelMap | ResourceStr | string | undefined
|
||||
|
||||
build() {
|
||||
if (this.src) {
|
||||
|
@ -29,13 +28,11 @@ export struct ZuImage {
|
|||
loadSrc: this.src,
|
||||
placeholderSrc: this.placeholderSrc,
|
||||
errorholderSrc: this.errorholderSrc ?? this.placeholderSrc,
|
||||
border: { radius: this.radius },
|
||||
objectFit: ImageFit.Cover
|
||||
})
|
||||
})
|
||||
} else {
|
||||
Image(this.placeholderSrc)
|
||||
.border({ radius: this.radius })
|
||||
.objectFit(ImageFit.Cover)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue