V 3.0.1 LaiTool V3.0.1-preview.3
This commit is contained in:
+5
-3
@@ -3,7 +3,7 @@ import { v4 as uuidv4 } from 'uuid'
|
||||
import { version } from '../../package.json'
|
||||
import { graphics } from 'systeminformation'
|
||||
|
||||
import { app, shell, BrowserWindow, ipcMain, dialog, nativeTheme } from 'electron'
|
||||
import { app, shell, BrowserWindow, ipcMain, dialog, nativeTheme, session } from 'electron'
|
||||
import path, { join } from 'path'
|
||||
import { electronApp, optimizer, is } from '@electron-toolkit/utils'
|
||||
import icon from '../../resources/icon.ico?asset'
|
||||
@@ -52,7 +52,7 @@ async function createWindow(hash = 'ShowMessage', data, url = null) {
|
||||
// 判断当前是不是有设置的宽高,用的话记忆
|
||||
let isRe =
|
||||
global.config.window_wh_bm_remember && hash == 'ShowMessage' && global.config.window_wh_bm
|
||||
|
||||
const ses = session.fromPartition('persist:my-session')
|
||||
let mainWindow = new BrowserWindow({
|
||||
width: isRe ? global.config.window_wh_bm.width : 900,
|
||||
height: isRe ? global.config.window_wh_bm.height : 675,
|
||||
@@ -69,7 +69,9 @@ async function createWindow(hash = 'ShowMessage', data, url = null) {
|
||||
nodeIntegration: hash == 'discord' ? false : true, // 在网页中集成Node
|
||||
nodeIntegrationInWorker: true,
|
||||
webSecurity: false,
|
||||
partition: 'persist:my-partition'
|
||||
partition: 'persist:my-partition',
|
||||
session: ses,
|
||||
webviewTag : true,
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user