修复重复打印
This commit is contained in:
@ -78,7 +78,7 @@ let print_monitor={
|
||||
|
||||
//开启打印监听
|
||||
openPrinting:function(win){
|
||||
ipcMain.on('print', function (event, json_data) {
|
||||
ipcMain.once('print', function (event, json_data) {
|
||||
let data = JSON.parse(json_data)
|
||||
log.info("打印开始,打印地址为:【"+json_data+"】")
|
||||
print_operation.printing(data.pdf_url, data.printer,win);
|
||||
@ -94,6 +94,9 @@ let print_monitor={
|
||||
win.on("close", (e) => {
|
||||
ipcMain.removeAllListeners('close_listPrinter');
|
||||
});
|
||||
win.on("close",(e) => {
|
||||
ipcMain.removeAllListeners('print');
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user