WIX反应本机导航V2底部标签奇怪的颜色变化

时间:2018-09-01 19:07:51

标签: ios reactjs react-native react-native-navigation react-native-navigation-v2

我的bottomTabs在单击选项卡时更改其颜色。我将背景色设置为'red',但是当我单击其他选项卡按钮时,整个选项卡栏会变成白色。

请任何人指出我在这里的错误是什么。 谢谢。

Navigation.setRoot({
      root: {
        bottomTabs: {
          options: {
            bottomTabs: {
              visible: true,
              animate: false, // Controls whether BottomTabs visibility changes should be animated
              currentTabIndex: 0,
              currentTabId: "currentTabId",
              testID: "bottomTabsTestID",
              drawBehind: false,
              backgroundColor: "red"
            }
          },
          children: [
            {
              stack: {
                children: [
                  {
                    component: {
                      name: "cardealership.myBusiness",

                    }
                  }
                ],
                options: {
                  bottomTab: {
                    text: "Tab 1",
                    icon: sources[1],
                    testID: "FIRST_TAB_BAR_BUTTON"
                  }
                }
              }
            },
            {
              component: {
                name: "cardealership.myBusiness",

                options: {
                  bottomTab: {
                    text: "Tab 2",
                    icon: sources[2],
                    testID: "SECOND_TAB_BAR_BUTTON"
                  }
                }
              }
            }
          ]
        }
      }
    });

img2

img1

0 个答案:

没有答案