Files
electron-egg/main.js
gaoshuaixing a27dbcfa72 1
2022-02-23 21:20:57 +08:00

54 lines
794 B
JavaScript

const Appliaction = require('ee-core').Appliaction;
const { app } = require('electron');
class Main extends Appliaction {
constructor() {
super();
}
/**
* core app have been loaded
*/
async ready () {
// do some things
}
/**
* main window have been loaded
*/
async windowReady () {
// do some things
// const app = this;
// // preload预加载模块
// const preload = require('./electron/preload');
// preload(app);
}
startEggCluster (options) {
return new Promise((resolve, reject) => {
console.log('op:', options);
startCluster(options, function(){
resolve('success');
});
});
}
/**
* before app close
*/
async beforeClose () {
// do some things
}
}
new Main();