From af66a14a3a50911df1389a7319f8175e3a519592 Mon Sep 17 00:00:00 2001 From: zhoulisheng <635547767@qq.com> Date: Thu, 28 Dec 2023 15:15:11 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BC=98=E5=8C=96HSP=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhoulisheng <635547767@qq.com> --- library/src/main/ets/components/PixelMapUtils.ts | 2 +- library/src/main/ets/components/RoundedImageView.ets | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/src/main/ets/components/PixelMapUtils.ts b/library/src/main/ets/components/PixelMapUtils.ts index 1957b96..5c3c93e 100644 --- a/library/src/main/ets/components/PixelMapUtils.ts +++ b/library/src/main/ets/components/PixelMapUtils.ts @@ -29,7 +29,7 @@ class PixelMapUtils { } switch (srcType) { case SrcType.MEDIA: // media相关数据 - context.resourceManager.getMediaContent(src.id, (error, value) => { + context.createModuleContext(src.moduleName).resourceManager.getMediaContent(src.id, (error, value) => { if (error != null) { console.log("error is " + error); } else if(value){ diff --git a/library/src/main/ets/components/RoundedImageView.ets b/library/src/main/ets/components/RoundedImageView.ets index c32f639..b61b99e 100644 --- a/library/src/main/ets/components/RoundedImageView.ets +++ b/library/src/main/ets/components/RoundedImageView.ets @@ -214,7 +214,7 @@ export struct RoundedImageView { switch (this.model.srcType) { case SrcType.MEDIA: let mediaSrc:Resource = this.model.src as Resource - context.resourceManager.getMediaContent(mediaSrc.id, (error:Error, value:Uint8Array) => { + context.createModuleContext(mediaSrc.moduleName).resourceManager.getMediaContent(mediaSrc.id, (error:Error, value:Uint8Array) => { callback(value); }) break -- Gitee