react native ios 系统输入法不能输入中文的解决办法

这里,这篇文章写的不错,我就是记录一下

class MyTextInput extends Component {
  shouldComponentUpdate(nextProps){

    return Platform.OS !== 'ios' || (this.props.value === nextProps.value &&  
           (nextProps.defaultValue == undefined || nextProps.defaultValue == '' )) || 
           (this.props.defaultValue === nextProps.defaultValue &&  (nextProps.value == undefined || nextProps.value == '' ));
  
  }

  render() {
    return <TextInput {...this.props} />;
  }
};
 

  

 

猜你喜欢

转载自www.cnblogs.com/lgp142332/p/9633017.html
今日推荐