简体   繁体   English

透明选项在带有 nodeIntegration 的 electron 中不起作用

[英]Transparent option does not work in electron with nodeIntegration

When I use nodeintegration in createWindow the transparency stop working and the background become white and it I set nodeintegration to false it does not render anything due to missing required当我在 createWindow 中使用 nodeintegration 时,透明度停止工作并且背景变为白色,并且我将 nodeintegration 设置为 false 由于缺少必需的,它不会呈现任何内容

function createWindow() {
    win = new BrowserWindow({
        width: 800, height: 650,
        minWidth: 800,
        minHeight: 650,
        icon: './tpologo.png',
        titleBarStyle: 'hidden',
        frame: false,
        transparent: true,
        resizable: false,
        webPreferences: {
            nodeIntegration:true
        }
    });

节点集成:真

节点整合:假

I found the problem.我发现了问题。 the problem was v-app that is for vuetify and its default background color is white问题是用于 vuetify 的 v-app,其默认背景颜色为白色

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM