调试打印

This commit is contained in:
gyq
2024-03-05 09:52:20 +08:00
parent 0fa0d56558
commit d00612da5a
10 changed files with 143 additions and 93 deletions

View File

@@ -7,9 +7,9 @@ app.whenReady().then(() => {
width: 1200,
height: 800,
fullscreenable: true,
fullscreen: false,
fullscreen: true,
simpleFullscreen: true,
frame: true,
frame: false,
webPreferences: {
// 集成网页和 Node.js也就是在渲染进程中可以调用 Node.js 方法
nodeIntegration: true,
@@ -24,7 +24,7 @@ app.whenReady().then(() => {
// Load your file
win.loadFile("dist/index.html");
}
win.webContents.openDevTools();
// win.webContents.openDevTools();
app.on("activate", () => {
// 在 macOS 系统内, 如果没有已开启的应用窗口
// 点击托盘图标时通常会重新创建一个新窗口
@@ -38,10 +38,7 @@ app.whenReady().then(() => {
});
ipcMain.on('printerInfoSync', async (event, params) => {
console.log('接收到打印消息', params)
const res = await printUtils(params)
event.returnValue = res
console.log('已打印', res)
await printUtils(params)
})
});