message: fix: switch onClick
diff: @@ -21,8 +21,10 @@ class Switch extends Component {
  }
  }
  clickEvent () {
  - const { disabled, onChange } = this.props
  + const { disabled, onChange, onClick } = this.props
  if (!disabled) {
  + const res = onClick(this.state.checked)
  + if (res) {
  this.setState({
  checked: !this.state.checked
  }, () => {
  @@ -30,6 +32,7 @@ class Switch extends Component {
  })
  }
  }
  + }
  render () {
  const { theme, content, disabled } = this.props
  const { checked } = this.state
  @@ -57,12 +60,14 @@ Switch.defaultProps = {
  content: [],
  checked: false,
  disabled: false,
  - onChange: () => {}
  + onChange: () => {},
  + onClick: () => { return true }
  }
  Switch.propTypes = {
  content: PropTypes.array,
  checked: PropTypes.bool,
  disabled: PropTypes.bool,
  - onChange: PropTypes.func
  + onChange: PropTypes.func,
  + onClick: PropTypes.func
  }
  export default Provider(Switch)
  