点击用户头像图标,我将弹出用户信息。切换效果很好,但其他弹出窗口的问题并不隐藏。一次只应显示一个弹出窗口。问题可以在这里检查。
https://int-app.guidanceguide.com/parenting/guides/home
我在每个弹出组件中都使用了弹出状态。
发布于 2019-06-27 16:02:02
我认为你需要为每个弹出窗口创建一个变量,并将它的值初始赋值为false。然后在需要工作时将其设置为true。
例如
open=false;
------
some code
-----
handleUpdate = (e) =>
{
this.open=true;
-----some code----
}
--------
then in the JSX part
<Popup open={this.open} id="popup_id" >
<div>----</div>
-------------(put your JSX here)
</Popup>
~~~https://stackoverflow.com/questions/56786370
复制相似问题