我在哪里可以设置可变制表符宽度而不是在 React 导航中固定?
目前所有的tab都是一样宽的,需要换行到text的宽度。
最佳答案
您可以在导航选项中使用 tabBarLabel 选项。使用 Text 元素上的 style 属性,您可以设置宽度。
navigationOptions: {
tabBarLabel: <Text style={{ textAlign: 'center', width: 200 }}>Long Tab Title</Text>
},
关于reactjs - react 导航变量标签宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48616248/