[英]Remove textDecorationLine from nested text components for React Native
[英]Remove textDecorationLine from nested text
我是React Native
新手,我嘗試使用內聯文本創建文本,如下所示:
<Text style={{textDecorationLine: 'line-through'}}>
$75.00{' '}
<Text style={{textDecorationLine: 'none'}>$50</Text>
</Text>
問題是它呈現
$ 75.00 $ 50.00
並不是
$ 75.00$ 50.00
我見過有一個解決辦法在html
,是否有類似的解決方案React Native
?
code
部分中,但是此功能似乎不再起作用。 您可以按照以下方式編寫代碼
<Text>
<Text style={{textDecorationLine: 'line-through'}}>$75.00</Text>
<Text style={{textDecorationLine: 'none'}}>$50</Text>
</Text>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.