問題描述
如何(或者甚至可能)在 Electron 中使用自定義 HTML 對話框?我知道 Electron 提供了某些對話框(showMessageDialog
、showErrorDialog
),但這些似乎不允許自定義 HTML.
How (or is it even possible) to use custom HTML dialogs in Electron? I know that Electron provides certain dialogs (showMessageDialog
, showErrorDialog
) but these do not seem to allow custom HTML.
我不希望使用原生 HTML 對話框 (dialog
) 標簽,因為它不會融入"用戶界面.
I do not wish to use native HTML dialogs (dialog
) tag as it does not 'blend in' with the user interface.
任何幫助將不勝感激.謝謝!
Any help would be much appreciated. Thanks!
推薦答案
您可以創建一個模態的 BrowserWindow,如果您愿意,也可以是無框的.參見 http://electron.atom.io/docs/api/browser-window/.
You can create a BrowserWindow that's modal and, if you like, frameless. See http://electron.atom.io/docs/api/browser-window/.
這篇關于Electron 中的自定義 HTML 對話框的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!