From 67f0c4b279eadbff13f592d74fdbf8a3c756fbd3 Mon Sep 17 00:00:00 2001 From: sunjiakun Date: Sat, 1 Jul 2023 18:37:24 +0800 Subject: [PATCH] update tabs Signed-off-by: sunjiakun --- .../src/main/ets/TestAbility/pages/IndexSec.ets | 4 ++++ .../ace_ets_component_tabs/src/main/ets/test/TabsSec.ets | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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 4689ab1f2..83ea66663 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 @@ -172,6 +172,10 @@ struct TabsExampleSec { .barBackgroundColor(this.barBackgroundColorString) .key('BarBackgroundColorString') + Button("ResourceColor") + .fontSize(40) + .backgroundColor($r("sys.color.ohos_toggle_bg")) + .key("ResourceColor") Tabs({ barPosition: BarPosition.End, controller: this.controller }) { TabContent() { Column(){ diff --git a/arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/ets/test/TabsSec.ets b/arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/ets/test/TabsSec.ets index 7c1341d26..7212a711d 100644 --- a/arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/ets/test/TabsSec.ets +++ b/arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/ets/test/TabsSec.ets @@ -526,7 +526,10 @@ export default function tabsSec() { let obj = JSON.parse(newJson); console.info("[ArkUI_Tabs_BarBackgroundColor_0500] barBackgroundColor:" + JSON.stringify(obj.$attrs.barBackgroundColor)); let barBackgroundColorObject = obj.$attrs.barBackgroundColor; - expect(barBackgroundColorObject).assertEqual("#0C182431"); + let newColor = getInspectorByKey('ResourceColor'); + let objColor = JSON.parse(newColor); + console.info("[ArkUI_Tabs_BarBackgroundColor_0500] objColor:" + JSON.stringify(objColor.$attrs.backgroundColor)); + expect(barBackgroundColorObject).assertEqual(objColor.$attrs.backgroundColor); done(); }); -- GitLab