diff --git a/src/main/index.js b/src/main/index.js index f43c571..a430510 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -244,6 +244,13 @@ app.on('ready', () => { loginWindow.show() loginWindow.focus() }) + // 打印窗口 + ipcMain.on('printPage', (event, printOptions) => { + //console.log("ipcMain-print-page") + mainWindow.webContents.print(printOptions, (success, failureReason) => { + if (!success) console.error(failureReason); + }); + }); //打开作业窗口 ipcMain.on('openWindow', (e, data) => { diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/index.vue index 03bb2e6..a8ab3c4 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/index.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/index.vue @@ -78,7 +78,7 @@