diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/withTheme.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/withTheme.ts index da29f821baffcfc57a48b6c5e0087e875192e1b2..4e6a40200ac7c7cc9ba78dcb8ea734f7ff250090 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/withTheme.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/withTheme.ts @@ -72,6 +72,7 @@ export interface WithThemeAttribute extends CommonMethod { return this } // attributeModifier(value: AttributeModifier | undefined): this + setWithThemeOptions(options: WithThemeOptions): this } export class ArkWithThemeStyle implements WithThemeAttribute { public attributeModifier(value: AttributeModifier | undefined): this { @@ -135,6 +136,9 @@ export class ArkWithThemeSet implements WithThemeAttribute { public attributeModifier(value: AttributeModifier | undefined): this { throw new Error("Not implemented") } + public setWithThemeOptions(options: WithThemeOptions): this { + return this; + } } export class WithThemeOptions_serializer { public static write(buffer: Serializer, value: WithThemeOptions): void { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/theme/ArkThemeNativeHelper.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/theme/ArkThemeNativeHelper.ts index ea1a6a62d58676d53e24bd8b43240df00ebdfd1f..69b183149bbffbba2a345a83cc22a401b545d26b 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/theme/ArkThemeNativeHelper.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/theme/ArkThemeNativeHelper.ts @@ -63,7 +63,7 @@ export class ArkThemeNativeHelper { ArkThemeScopeManager.getInstance().onEnterLocalColorMode(colorMode); } const thisSerializer : Serializer = Serializer.hold(); - const colorArray = ArkThemeNativeHelper.convertColorsToArray(theme?.colors); + const colorArray = ArkThemeNativeHelper.convertThemeToColorArray(theme); SerializeUtils.writeColorArray(thisSerializer, colorArray); ArkUIAniModule._CreateAndBindTheme(themeScopeId, themeId, thisSerializer.asBuffer(), thisSerializer.length(), colorMode, onThemeScopeDestroy);