jsx中代码:

<Icon type='plus' onClick={this.showAlbum} />

 对应的点击事件:

showAlbum = e => {
        e.stopPropagation();
        this.setState({
            albumVisible: true,
        });
    };

 看到了吗, 关键是 e.stopPropagation();

 

相关文章:

  • 2022-12-23
  • 2021-05-25
  • 2022-03-05
猜你喜欢
  • 2022-12-23
  • 2021-09-12
  • 2021-10-09
  • 2022-12-23
  • 2021-10-20
相关资源
相似解决方案