美文网首页
RN TextInput 设置文字靠右显示

RN TextInput 设置文字靠右显示

作者: liy_lmn | 来源:发表于2019-07-12 13:49 被阅读0次

本来想实现TextInput的placeholder靠右边显示,但是设置 textAlign: 'right'不起作用,查了一下资料和论坛,只在 Stack Overflow找到正确回复,分享一下,希望帮助大家,只需要加上 autoCapitalize='none'就可以了。

<TextInput
  placeholder='请........'
   style={{
     textAlign: 'right',
      }}
   autoCapitalize='none'
   underlineColorAndroid='transparent'>
</TextInput>

相关文章

网友评论

      本文标题:RN TextInput 设置文字靠右显示

      本文链接:https://www.haomeiwen.com/subject/fppekctx.html