javascript - 如何在反应原生的对象中访问父母的兄弟姐妹值?
问题描述
我想在标题默认中获取颜色有没有办法或者我应该为标题默认样式创建单独的组件?
import {Platform} from 'react-native';
export default {
colors:{
primaryColor: '#4a148c',
accentColor: '#ff6f00'
},
headerDefault:{
headerStyle: {
backgroundColor: Platform.OS === 'android'? this.colors.primaryColor:'',
height:100
},
headerTintColor: Platform.OS === 'android'? 'white':this.colors.primaryColor,
headerTitleStyle: {
fontWeight: 'bold',
},
headerTitleAlign:'center'
}
};
解决方案
推荐阅读
- r - RMarkdown 表格位置
- r - 如何在 R 中的错误消息中格式化输出
- php - 如何检查输入的数据是否在 foreach 中?
- c# - 会话 cookie 似乎不包括在内
- java - 如何给读用户一些写权限
- aws-lambda - 一个 AWS CloudWatch 事件来控制多件事
- javascript - 如何在 react-bootstrap-table2 组件中以编程方式验证行?
- maven - 创建一个新的 Maven 项目
- awesome-wm - 在 awesome-wm 中自动生成小部件
- scala - 数据源 io.pivotal.greenplum.spark.GreenplumRelationProvider 不支持流式写入