f12弹出控制台开启

This commit is contained in:
yj 2024-09-09 11:46:17 +08:00
parent 5a8678a3a1
commit 953749867b
1 changed files with 2 additions and 2 deletions

View File

@ -141,11 +141,11 @@ app.on('ready', () => {
}
// 监听f12打开控制台
mainWindow.webContents.on('before-input-event', (event, input) => {
if (env === 'development') {
// if (env === 'development') {
if (input.key === 'F12') {
mainWindow.webContents.openDevTools()
}
}
// }
});
// 监听移动
mainWindow.on('move', () => {