yangjie #22
8
main.js
8
main.js
|
|
@ -298,7 +298,13 @@ app.on('ready', () => {
|
||||||
width: config.width,
|
width: config.width,
|
||||||
height: config.height,
|
height: config.height,
|
||||||
})
|
})
|
||||||
child.loadURL(config.url)
|
if (env === 'development') {
|
||||||
|
// 开发
|
||||||
|
child.loadURL(config.url)
|
||||||
|
} else {
|
||||||
|
// 测试 | 生产
|
||||||
|
child.loadURL(`file://${path.join(__dirname, './dist/index.html')}#/${config.key}`);
|
||||||
|
}
|
||||||
childWindow[config.key] = child
|
childWindow[config.key] = child
|
||||||
child.once('ready-to-show', () => {
|
child.once('ready-to-show', () => {
|
||||||
childWindow[config.key].show()
|
childWindow[config.key].show()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue