更改所选TopTab边框颜色的颜色

时间:2019-06-12 12:07:39

标签: react-native-navigation

如何更改边框的颜色。

我尝试在选项中使用以下内容,但这不起作用。

topBar: {
 borderColor: "white"
}

enter image description here

1 个答案:

答案 0 :(得分:0)

尝试过哪种操作系统? (Android / iOS)(我使用PhpStorm是因为我是全栈开发人员,强烈建议。)通过选择topBar,您可以使用ctrl + b转到源代码。

Options.ts

/**
   * Change the navbar border color
   * #### (Android specific)
*/
borderColor?: Color;

如果不是两者都设置,请设置 borderHeight 。像这样(来自我的代码

stack:{
    children:[
        {
            component:{
                name: 'app.Main.Shop',
                options:{
                    topBar:{
                        borderColor:'blue',
                        borderHeight:2
                    },
                },
            }
        }
    ],
    options: {..}
}

这样的结果

enter image description here