反应本机样式textDecorationLine:'下划线'在iOS 13中不起作用

时间:2020-03-26 14:08:29

标签: react-native react-native-ios

我正在尝试呈现多行文本,例如。这是我的文字,阅读更多 ,其中“ 阅读更多”是我应用的样式textDecorationLine: 'underline'。在Android中效果很好。 iOS 13,仅当下划线文本不在第一行时才起作用。 Refer the screenshot。我试图将这些文本包装在View中,但是我必须在从Server.Any解决方案获得的文本的末尾呈现此文本。

                    <Text
                     style={{
                        fontSize: 12,
                        flexWrap: 'wrap',
                        marginHorizontal:10
                     }}
                    >
                    {text}
                    <Text
                      style={{
                             textDecorationLine: 'underline',
                             textDecorationStyle: 'solid',
                      }}
                      onPress={() => {
                        this.readMore();
                      }}
                    >
                      Read more
                    </Text>
                </Text>

0 个答案:

没有答案