This commit is contained in:
parent
ad07bd753f
commit
d1b58efc52
8
main.js
8
main.js
|
|
@ -322,6 +322,13 @@ app.on('ready', () => {
|
|||
childWindow[config.key].show()
|
||||
windowOperation(config)
|
||||
})
|
||||
child.webContents.on('before-input-event', (event, input) => {
|
||||
// if (env === 'development') {
|
||||
if (input.key === 'F12') {
|
||||
child.webContents.openDevTools()
|
||||
}
|
||||
// }
|
||||
});
|
||||
});
|
||||
// 关闭子窗口
|
||||
ipcMain.handle('closeChildWindow', (event, key) => {
|
||||
|
|
@ -418,7 +425,6 @@ function quitAndInstall() {
|
|||
function windowOperation(config) {
|
||||
const child = childWindow[config.key];
|
||||
child.setResizable(false)
|
||||
if (env === 'development') child.webContents.openDevTools();
|
||||
if (config.key === 'shareScreenWindow') {
|
||||
const display = screen.getDisplayMatching({ ...child.getBounds() });
|
||||
const x = Math.round((display.workArea.width - child.getSize()[0]) / 2);
|
||||
|
|
|
|||
Loading…
Reference in New Issue