我在一个文本元素中有2个文本元素。我尝试将第二个文本元素发送到末尾,但我不能这样做,该怎么办呢?
<Text style={[styles.text2, item.Ccolor == 'MAVI' ? {color:'rgba(14, 110, 172, 1)'}: {color:'#f7b731'},{position:'relative'}]}
animation={isActive ? 'bounceIn' : undefined}>
<Text style={{textAlign:'left'}}> {item.Beyanname} </Text>
<Text style={{position:'absolute',right:0}}> {item.Gumruk} </Text>
</Text>
答案 0 :(得分:1)
根据React Native文档,Text
组件没有position
道具。
请改用View
,但要注意,不能在View
中使用Text
。
<View style={{position:'absolute',right:0}}>
<Text>{item.Gumruk}</Text>
</View>