1.  
    // 首先在constructor里:
  2.  
    this.state = { visible: false }
  3.  
    // 然后在点击事件设置:
  4.  
    this.setState({ visible: true })
  5.  
    // render函数里利用三木运算:
  6.  
    {this.state.visible ? (
  7.  
    <Alert message="用户名或密码错误" type="warning" showIcon />
  8.  
    ) : null}

相关文章:

  • 2022-02-11
  • 2022-12-23
  • 2022-12-23
  • 2021-06-14
  • 2022-01-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-06
  • 2022-12-23
  • 2022-01-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案