<TouchableOpacity
style={{backgroundColor: '#FF00FF'}}
onPress={this.inputField}
>
<UselessTextInput
multiline = {true}
numberOfLines = {4}
onChangeText={(text) => this.setState({text})}
value={this.state.text}
/>
</TouchableOpacity>
onPress 调用的函数是:
inputField() {
console.log('Clicked')
}
我找不到任何解决方案它不起作用我尝试更改onPress
它onPress={() => { console.log('Clicked') }}
仍然不起作用
谁能告诉我它不工作我做错了什么