我想从电子对话框的回调函数中获取值,并在新变量中重新分配回调结果。
const {dialog } = electron;
let options = {
type: 'warning',
buttons: ['Close','Register'],
message: 'license Key Not Found!',
detail: "license Key does't found! Please register to download license key."
};
var results = dialog.showMessageBox(null,options, function (res) {
return res;
});
console.log(results);
出现未定义的值。