import { setCustomText, setCustomTextInput } from 'react-native-global-props'
import { TEXT_COLOR } from '../config/theme'
import { Platform, Text, TextInput, StyleSheet } from 'react-native'
const customTextProps = {
style: {
color: TEXT_COLOR.default,
...Platform.select({
android: { fontFamily: '' } // 处理安卓部分机型文字显示不全的问题
})
}
}
//
Text.defaultProps = Object.assign({}, Text.defaultProps, {
allowFontScaling: false
})
TextInput.defaultProps = Object.assign({}, TextInput.defaultProps, {
allowFontScaling: false
})
export default function init() {
setCustomText(customTextProps)
}
网友评论