react-native可以通过修改Text组件属性来改变项目的默认字体?
类似下面的写法,在App.js里。不知能否实现?
Text.defaultProps = Object.assign({}, Text.defaultProps, {allowFontScaling: false});
我尝试这样做,项目的字体类型还是没变:
Text.defaultProps = Object.assign({}, Text.defaultProps, {allowFontScaling: false,style:{FontFamily:'xxx'});
如果要在项目里一个个改样式太麻烦了。求高人指点。