mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-08 06:16:27 +08:00
新增 showConfirmBox
This commit is contained in:
parent
ccb9fb0f5e
commit
1ec2657798
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user