TextStylePropTypes
道具
color?: color
fontFamily?: string
fontSize?: number
fontStyle?: enum('normal', 'italic')
fontWeight?: enum('normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900')
指定字体重量。大多数字体支持“正常”和“粗体”值。并非所有的字体都有各个数值的变体,在这种情况下,选择最接近的一个。
lineHeight?: number
textAlign?: enum('auto', 'left', 'right', 'center', 'justify')
指定文本对齐。值'justify'只支持iOS和left
在Android 上回退。
textDecorationLine?: enum('none', 'underline', 'line-through', 'underline line-through')
textShadowColor?: color
textShadowOffset?: {width: number, height: number}
textShadowRadius?: number
androidincludeFontPadding?: bool
设置为false
删除额外的字体填充,旨在为某些上行/下行空间腾出空间。使用一些字体时,这种填充可以使文本看起来在垂直居中时略微不对齐。为了最好的结果也设置textAlignVertical
为center
。默认值是true。
androidtextAlignVertical?: enum('auto', 'top', 'bottom', 'center')
iosfontVariant?: [enum('small-caps', 'oldstyle-nums', 'lining-nums', 'tabular-nums', 'proportional-nums')]
iosletterSpacing?: number
iostextDecorationColor?: color
iostextDecorationStyle?: enum('solid', 'double', 'dotted', 'dashed')
ioswritingDirection?: enum('auto', 'ltr', 'rtl')
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com