This commit is contained in:
gyq
2024-07-12 17:12:51 +08:00
parent 8c1e1d3fbc
commit 815b6e0a25
6 changed files with 22 additions and 221 deletions

View File

@@ -1,5 +1,5 @@
import path from "path";
import { app, BrowserWindow, ipcMain, net } from "electron";
import { app, BrowserWindow, ipcMain } from "electron";
import os from "os";
// const SerialPort = require("serialport");
@@ -41,16 +41,6 @@ app.whenReady().then(() => {
app.quit();
});
// 监听网络在线事件
// net.on("online", () => {
// console.log("网络连接恢复");
// });
// // 监听网络离线事件
// net.on("offline", () => {
// console.log("网络连接断开");
// });
// 给渲染进程返回打印机列表
ipcMain.on("getPrintList", () => {
win.webContents.getPrintersAsync().then((res) => {