問題描述
如何(或者甚至可能)在 Electron 中使用自定義 HTML 對(duì)話框?我知道 Electron 提供了某些對(duì)話框(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 對(duì)話框 (dialog
) 標(biāo)簽,因?yàn)樗粫?huì)融入"用戶界面.
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!
推薦答案
您可以創(chuàng)建一個(gè)模態(tài)的 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/.
這篇關(guān)于Electron 中的自定義 HTML 對(duì)話框的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!