为 Electron 授权窗口添加自定义图标的技术实现
为 Electron 授权窗口添加自定义图标的技术实现
·
import path from 'node:path'
const iconPath = path.join(__dirname, '../../build/icon.png')
const authWindow = new BrowserWindow({
width: 600,
height: 600,
icon: iconPath,
parent: mainWindow,
modal: false,
show: false,
autoHideMenuBar: true,
webPreferences: {
nodeIntegration: false,
contextIsolation: true,
sandbox: true
}
})
更多推荐
所有评论(0)