From 9626246a04357f00b52201a099225f5e815e271a Mon Sep 17 00:00:00 2001 From: sunjiakun Date: Wed, 9 Aug 2023 18:39:49 +0800 Subject: [PATCH] tabs Signed-off-by: sunjiakun --- .../src/main/ets/TestAbility/pages/IndexSec.ets | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/ets/TestAbility/pages/IndexSec.ets b/arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/ets/TestAbility/pages/IndexSec.ets index 83ea66663..8715d9111 100644 --- a/arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/ets/TestAbility/pages/IndexSec.ets +++ b/arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/ets/TestAbility/pages/IndexSec.ets @@ -27,16 +27,14 @@ struct TabsExampleSec { @State barBackgroundColorColor: Color = Color.Red @State barBackgroundColorNumber: number = 0 @State barBackgroundColorString: string = "#00000000" - @State barBackgroundColorResource: Resource = $r("sys.color.ohos_toggle_bg") private stateChangCallBack = (eventData) => { console.info("tabs page state change called:" + JSON.stringify(eventData)); if (eventData != null) { this.barOverlap = eventData.data.barOverlap; this.barBackgroundColorColor = eventData.data.barBackgroundColorColor; - this.barBackgroundColorNumber = eventData.data.barBackgroundColorNumber; - this.barBackgroundColorString = eventData.data.barBackgroundColorString; - this.barBackgroundColorResource = eventData.data.barBackgroundColorResource; + this.barBackgroundColorNumber = eventData.data.barBackgroundColorNumber; + this.barBackgroundColorString = eventData.data.barBackgroundColorString; } } @@ -196,7 +194,7 @@ struct TabsExampleSec { .animationDuration(200) .height('90%') .width('90%') - .barBackgroundColor(this.barBackgroundColorResource) + .barBackgroundColor($r("sys.color.ohos_toggle_bg")) .key('BarBackgroundColorResource') } } -- GitLab