新增 showConfirmBox

This commit is contained in:
fofolee 2020-07-20 19:06:51 +08:00
parent ccb9fb0f5e
commit 1ec2657798

View File

@ -276,6 +276,23 @@ quickcommand = {
});
},
showConfirmBox: function(title) {
return new Promise((reslove, reject) => {
let options = {
text: title,
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: '确定!',
cancelButtonText: '手抖...',
}
Swal.fire(options).then(result => {
if (result.value) reslove()
})
});
},
// 关闭进程
kill: function (pid, signal = 'SIGTERM') {
process.kill(pid, signal)