打开调试窗口

This commit is contained in:
朱浩 2024-10-10 10:12:38 +08:00
parent 28b189e965
commit 71bd199f4a
3 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{
"name": "aix-win",
"version": "2.1.3",
"version": "2.1.5",
"description": "",
"main": "./out/main/index.js",
"author": "example.com",

View File

@ -74,7 +74,7 @@ function createLoginWindow() {
updateInit(loginWindow)
}
// loginWindow.webContents.openDevTools()
loginWindow.webContents.openDevTools()
loginWindow.once('ready-to-show', () => {
loginWindow.show()
})
@ -128,7 +128,7 @@ function createMainWindow() {
shell.openExternal(details.url)
return { action: 'deny' }
})
// mainWindow.webContents.openDevTools()
mainWindow.webContents.openDevTools()
if (is.dev && process.env['ELECTRON_RENDERER_URL']) {
mainWindow.loadURL(process.env['ELECTRON_RENDERER_URL'])

View File

@ -138,7 +138,7 @@ export const createWindow = async (type, data) => {
wins_tool.setIgnoreMouseEvents(true, {forward: true}) // 忽略鼠标事件但是事件继续传递给窗口
wins_tool.setAlwaysOnTop(true,'screen-saver') // 将窗口设置为顶层窗口
wins_tool.setVisibleOnAllWorkspaces(true) // 如果窗口在所有工作区都可见
// wins_tool.webContents.openDevTools() // 打开调试工具
wins_tool.webContents.openDevTools() // 打开调试工具
eventHandles(type, wins_tool) // 事件监听处理
return wins_tool
}
@ -165,7 +165,7 @@ export const createWindow = async (type, data) => {
win.type = type // 唯一标识
win.show()
win.setFullScreen(true) // 设置窗口为全屏
// win.webContents.openDevTools() // 打开调试工具
win.webContents.openDevTools() // 打开调试工具
eventHandles(type, win) // 事件监听处理
winPdf=win
break