1 Star 0 Fork 1.2K

独孤剑 / electron-egg

forked from dromara / electron-egg 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main.js 760 Bytes
一键复制 编辑 原始数据 按行查看 历史
gaoshuaixing 提交于 2022-12-14 19:58 . addon java-server
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();
JavaScript
1
https://gitee.com/zhanglujun2018/electron-egg.git
git@gitee.com:zhanglujun2018/electron-egg.git
zhanglujun2018
electron-egg
electron-egg
master

搜索帮助