fix: 修复mini窗口显示异常

This commit is contained in:
2020-12-01 21:04:33 +08:00
parent b1bb523ec4
commit 0b7439800d
3 changed files with 34 additions and 19 deletions
+7
View File
@@ -1,5 +1,6 @@
const { app, Menu } = require('electron');
const { toggleTrayIcon } = require('./tools');
const { config } = require('./config');
function getMenu(/** @type Electron.BrowserWindow */mainWindow, miniWindow, current) {
const template = [{
@@ -21,6 +22,12 @@ function getMenu(/** @type Electron.BrowserWindow */mainWindow, miniWindow, curr
miniWindow.focus();
}
},
{
label: "重载页面",
click: () => {
current.loadURL(config.url);
}
},
{
label: "打开调试控制台",
click: () => current.webContents.openDevTools()