最佳答案
我有一个文本输入。当用户输入文本时,我希望它显示密码点/星号(****
) ,而不是显示实际输入的文本。我怎么能这么做?
<TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1 }}
onChangeText={(text) => this.setState({input: text})}
/>