mirror of
https://gitee.com/dromara/electron-egg.git
synced 2026-06-10 03:07:32 +08:00
del index
This commit is contained in:
@@ -1,48 +0,0 @@
|
||||
const { Application } = require('ee-core');
|
||||
|
||||
class App extends Application {
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
App.toString = () => '[class App]';
|
||||
module.exports = App;
|
||||
Reference in New Issue
Block a user