|
|
@@ -102,6 +102,23 @@ app.on('second-instance', (event, commandLine, workingDirectory) => { |
|
|
|
// code. You can also put them in separate files and require them here. |
|
|
|
|
|
|
|
// 监听必要的自定义事件 |
|
|
|
// 缩小 放大 暂时关闭窗口 |
|
|
|
ipcMain.handle('shrink-browser-window', async (event, args) => { |
|
|
|
mainWindow.minimize(); |
|
|
|
}); |
|
|
|
ipcMain.handle('enlarge-browser-window', async (event, args) => { |
|
|
|
mainWindow.maximize(); |
|
|
|
}); |
|
|
|
ipcMain.handle('unmax-browser-window', async (event, args) => { |
|
|
|
mainWindow.unmaximize(); |
|
|
|
}); |
|
|
|
ipcMain.handle('close-browser-window', async (event, args) => { |
|
|
|
mainWindow.close(); |
|
|
|
}); |
|
|
|
// 判断是否是最大化窗口状态 |
|
|
|
ipcMain.handle('is-max-window-now', async (event, args) => { |
|
|
|
return mainWindow.isMaximized(); |
|
|
|
}); |
|
|
|
/** |
|
|
|
* 项目中的文件上传 |
|
|
|
*/ |
|
|
|