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 83ea66663a7b76881f7759d5c5d18d23d79db86d..8715d9111f31e398288dc7cfebc2feb58ffeed27 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') } }