我修改了这段代码中的 numberOfLines。
但是我还没弄清楚它有什么可恨性。
这是怎麽?
<Text numberOfLines={10}>{this.state.bodyText}</Text>
numberOfLines
用于限制屏幕上的可见文本。
来自文档: (https://facebook.github.io/react-native/docs/text#numberoflines)
Used to truncate the text with an ellipsis after computing the text layout, including line wrapping, such that the total number of lines does not exceed this number.
This prop is commonly used with ellipsizeMode.