1 Star 0 Fork 1.4K

SHAO/electron-egg

forked from dromara/electron-egg 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.js 760 Bytes
一键复制 编辑 原始数据 按行查看 历史
gaoshuaixing 提交于 2022-07-29 11:31 . 延迟加载
const Appliaction = require('ee-core').Appliaction;
class Main extends Appliaction {
constructor() {
super();
// this === eeApp;
}
/**
* core app have been loaded
*/
async ready () {
// do some things
}
/**
* electron app ready
*/
async electronAppReady () {
// do some things
}
/**
* main window have been loaded
*/
async windowReady () {
// do some things
// 延迟加载,无白屏
const winOpt = this.config.windowsOption;
if (winOpt.show == false) {
const win = this.electron.mainWindow;
win.once('ready-to-show', () => {
win.show();
})
}
}
/**
* before app close
*/
async beforeClose () {
// do some things
}
}
new Main();
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/SHAOQQ/electron-egg.git
git@gitee.com:SHAOQQ/electron-egg.git
SHAOQQ
electron-egg
electron-egg
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385