15815213711
2025-04-24 16c179b122eb8c69d31b0fab66c5e29b9c332b8d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
const { Application } = require('ee-core');
 
class Index extends Application {
 
  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();
        win.focus();
      })
    }
  }
 
  /**
   * before app close
   */  
  async beforeClose () {
    // do some things
 
  }
}
 
Index.toString = () => '[class Index]';
module.exports = Index;