当 this.state.item1 为真时,它不起作用。
onfocus: {
backgroundColor: 'black',
width: 800,
},
this.state = {
item1: true,
};
<Image key={"item1"} style={this.state.item1 && styles.onfocus} source={{ uri: 'https://github.com/c-bata/react-native-focus-scroll/blob/master/example/assets/rokko-yamatanoorochi-ipa.jpg?raw=true' }} />