我收到此错误但未获得解决此问题的解决方案。
mainWindow.loadURL不是函数
const electron = require('electron');
const {Menu} = require('electron');
const {app} = require('electron');
const BrowserWindow = require('browser-window');
const conn = require('mysql');
const path = require('path');
const url = require('url');
var mainWindow;
app.on('ready', function () {
mainWindow = new BrowserWindow({ width: 1024, height: 768, backgroundcolor: 'black' });
**mainWindow.loadURL(url.format({** //Here I am getting an error.
pathname: 'popupcheck.html',
protocol: 'file:',
slashes: true
}));
mainWindow.webContents.openDevTools();
mainWindow.setProgressBar(1);
});
答案 0 :(得分:0)