electron启动出现短暂的白屏

Posted ybixian

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了electron启动出现短暂的白屏相关的知识,希望对你有一定的参考价值。

  mainWindow = new BrowserWindow({
    height: 600,
    width: 960,
    frame: false,
    minWidth: 710,
    minHeight: 500,
    offscreen: true,
    webPreferences: {webSecurity: false},
    resizable: true,
    skipTaskbar: false,
    flashFrame: true,
    show: false // 先隐藏
  })
  mainWindow.openDevTools() // 开发者工具
  mainWindow.loadURL(winURL)
  mainWindow.on('ready-to-show', function () {
    mainWindow.show() // 初始化后再显示
  })

技术图片

以上是关于electron启动出现短暂的白屏的主要内容,如果未能解决你的问题,请参考以下文章