新增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',
|
uri: 'pages/TestCommonImage',
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
Button("测试占位图Task报错").margin({top:10}).onClick(()=>{
|
||||||
|
router.push({
|
||||||
|
uri: 'pages/TestTaskResourcePage',
|
||||||
|
});
|
||||||
|
})
|
||||||
Button("测试HSP场景预加载").margin({top:10}).onClick(()=>{
|
Button("测试HSP场景预加载").margin({top:10}).onClick(()=>{
|
||||||
router.push({
|
router.push({
|
||||||
uri: 'pages/TestHspPreLoadImage',
|
uri: 'pages/TestHspPreLoadImage',
|
||||||
|
|
|
@ -16,10 +16,9 @@ import { ImageKnifeComponent, ImageKnifeOption } from "@ohos/libraryimageknife"
|
||||||
|
|
||||||
@ComponentV2
|
@ComponentV2
|
||||||
export struct ZuImage {
|
export struct ZuImage {
|
||||||
@Param src: PixelMap | ResourceStr | string | undefined
|
@Param @Require src: PixelMap | ResourceStr | string | undefined
|
||||||
@Param radius: BorderRadiuses | Length | LocalizedBorderRadiuses | undefined
|
@Param @Require placeholderSrc: PixelMap | ResourceStr | string | undefined
|
||||||
@Param placeholderSrc: PixelMap | ResourceStr | string | undefined
|
@Local errorholderSrc: PixelMap | ResourceStr | string | undefined
|
||||||
@Param errorholderSrc: PixelMap | ResourceStr | string | undefined
|
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
if (this.src) {
|
if (this.src) {
|
||||||
|
@ -29,13 +28,11 @@ export struct ZuImage {
|
||||||
loadSrc: this.src,
|
loadSrc: this.src,
|
||||||
placeholderSrc: this.placeholderSrc,
|
placeholderSrc: this.placeholderSrc,
|
||||||
errorholderSrc: this.errorholderSrc ?? this.placeholderSrc,
|
errorholderSrc: this.errorholderSrc ?? this.placeholderSrc,
|
||||||
border: { radius: this.radius },
|
|
||||||
objectFit: ImageFit.Cover
|
objectFit: ImageFit.Cover
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
Image(this.placeholderSrc)
|
Image(this.placeholderSrc)
|
||||||
.border({ radius: this.radius })
|
|
||||||
.objectFit(ImageFit.Cover)
|
.objectFit(ImageFit.Cover)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue