简体   繁体   English

如何创建一个非模态的React对话框?

[英]How to create a non-modal React dialog?

I'm working on a javascript React -based application running under nwjs . 我正在研究在nwjs下运行的基于JavaScript React的应用程序。

My task is: on a button click, display scrollable instructions in a dialog that users can drag to a second monitor, so they can do their work in the main window, following the instructions in my new dialog. 我的任务是:单击按钮后,在对话框中显示可滚动的说明,用户可以将其拖动到第二台监视器,以便他们可以按照我的新对话框中的说明在主窗口中进行工作。

I only know how to make modal dialogs with React. 我只知道如何使用React进行模式对话框。 How do I make a non-modal dialog, so the user can scroll through the instructions as needed while they work in the main window? 如何制作非模态对话框,以便用户在主窗口中工作时可以根据需要滚动说明?

Window you create trought react, must stay in browser window. 您创建的窗口发生了反应,必须留在浏览器窗口中。

Call new child window so you get new window that can be dragged across desktop. 调用新的子窗口,以便获得可以在桌面上拖动的新窗口。

Window.open(url, [options], [callback])

See documentation 参阅文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM