如何(或者甚至可能)在 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模板网!
在 Electron 渲染器进程中创建子窗口时如何修复How to fix BrowserWindow is not a constructor error when creating child window in Electron renderer process(在 Electron 渲染器进程中创建子窗口
Electron webContents executeJavaScript:无法在第二个 loaElectron webContents executeJavaScript : Cannot execute script on second on loadURL(Electron webContents executeJavaScript:无法在第二个 loadURL 上
如何在angular-cli的组件内使用电子浏览器窗口?how to use electron browser window inside components in angular-cli?(如何在angular-cli的组件内使用电子浏览器窗口?)
ElectronJS - 在 Windows 之间共享 redux 存储?ElectronJS - sharing redux store between windows?(ElectronJS - 在 Windows 之间共享 redux 存储?)
如何在电子应用程序中访问相机/网络摄像头?How to access camera/webcamera inside electron app?(如何在电子应用程序中访问相机/网络摄像头?)
如何通过电子应用程序中的 navigator.geolocation 获取How to getCurrentPosition via navigator.geolocation in Electron app?(如何通过电子应用程序中的 navigator.geolocation 获取当前位置?)