- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
消息框显示正确,但是当我选择按钮之一时,关闭不会触发。这是我的代码:
dialog.showMessageBox(options, (response, checkboxChecked) => {
/* More code like log statements, opening error boxes, etc*/
}
选项定义为
choices = ["Yes", "No"], message = "Confirm"
。
最佳答案
尝试:
const options = {
type: 'question',
buttons: ['Cancel', 'Yes, please', 'No, thanks'],
defaultId: 2,
title: 'Question',
message: 'Do you want to do this?',
detail: 'It does not really matter',
checkboxLabel: 'Remember my answer',
checkboxChecked: true,
};
dialog.showMessageBox(null, options, (response, checkboxChecked) => {
console.log(response);
console.log(checkboxChecked);
});
关于javascript - showMessageBox promise 永远不会被调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62899221/
选举 v8.0.0; macOS 10.14.5 有没有人成功获得一个图标来显示 dialog.showMessageBox在 renderer过程? 我可以从 main 获取图标处理但不是来自 re
消息框显示正确,但是当我选择按钮之一时,关闭不会触发。这是我的代码: dialog.showMessageBox(options, (response, checkboxChecked) => { /
因此,问题是:单击按钮后,我将打开一个类型为“info”的 Electron messageBox。它具有“确定”和“取消”选项。如果单击“确定”,没问题。但是,当我单击“取消”,然后再次单击我的按钮
我正在学习Electron并尝试非常基础的东西……没有成功。 无论我使用哪种技术使对话框模态化,它都会失败。对话框不是模态的,或者对话框是空的(...仍然不是模态的)。 const {BrowserW
我有一个正常工作的dialog.showMessageBox,并且可以按照我的指示执行操作。 electron.dialog.showMessageBox({ type: 'i
我有一个消息框,当用户在 dashboardWindow 上单击关闭(Windows 操作系统右上角的 X 按钮)时,该消息框将打开 dashboardWindow.on("close", (even
下面的代码只是使用 Electron Node 模块显示对话框。 app.js const { dialog } = require('electron') const respons
我是一名优秀的程序员,十分优秀!