⬆️ 升级 electron 到 26

This commit is contained in:
muwoo
2023-08-22 13:52:47 +08:00
parent 6e5a08b9d8
commit d2d94c13b7
21 changed files with 199 additions and 196 deletions

View File

@@ -2,11 +2,16 @@ import { app, BrowserWindow, protocol, nativeTheme } from 'electron';
import path from 'path';
import { createProtocol } from 'vue-cli-plugin-electron-builder/lib';
import versonHandler from '../common/versionHandler';
// eslint-disable-next-line @typescript-eslint/no-var-requires
require('@electron/remote/main').initialize();
export default () => {
let win: any;
const init = () => {
createWindow();
// eslint-disable-next-line @typescript-eslint/no-var-requires
require('@electron/remote/main').enable(win.webContents);
};
const createWindow = async () => {
@@ -22,7 +27,6 @@ export default () => {
backgroundColor: nativeTheme.shouldUseDarkColors ? '#1c1c28' : '#fff',
webPreferences: {
webSecurity: false,
enableRemoteModule: true,
backgroundThrottling: false,
contextIsolation: false,
webviewTag: true,