【发布时间】:2017-06-24 16:26:46
【问题描述】:
打开多个 BrowserWindows 的正确方法是什么?我这样做并且到目前为止工作正常。是不是更好地做出一系列胜利?
let win;
function createWindow () {
for (i=0; i<loadNotes.notes.length; i++){
win = new BrowserWindow({
'x': loadNotes.notes[i].pos.x,
'y': loadNotes.notes[i].pos.y,
'width': loadNotes.notes[i].pos.width,
'height': loadNotes.notes[i].pos.height,
'frame': false});
win.setMenu(null);
win.loadURL(`file://${__dirname}/index.html?${loadNotes.notes[i].name}`);
//win.webContents.openDevTools()
}
win.on('close', () => {
})
win.on('closed', () => {
win = null
});
}
【问题讨论】:
标签: electron