Moh*_*zad 4 android ios react-native
我正在尝试使文本的某些部分具有不同的颜色并可以点击
这是我的代码:
<Text style = {styles.term_service}>By signing up, you agree to Terms of Service and Privacy Policy.</Text>
Run Code Online (Sandbox Code Playgroud)
我想使“服务条款”和“隐私权政策”可点击,并使用不同的颜色。
您可以使用嵌套文本文档也可以Text接受onPress 文档
<Text style = {styles.term_service}>By signing up, you agree to Terms of Service and <Text onPress={()=> someAction()} style = {{ color: '#fff' }}>Privacy Policy.</Text></Text>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2489 次 |
| 最近记录: |