mirror of
https://gitee.com/dromara/electron-egg.git
synced 2026-05-14 11:52:07 +08:00
恢复
This commit is contained in:
@@ -32,13 +32,11 @@
|
|||||||
<a-space>
|
<a-space>
|
||||||
<a-button @click="runJobByPool(3, 'run')">执行任务3</a-button>
|
<a-button @click="runJobByPool(3, 'run')">执行任务3</a-button>
|
||||||
进度:{{ progress3 }} , 进程pid:{{ progress3_pid }}
|
进度:{{ progress3 }} , 进程pid:{{ progress3_pid }}
|
||||||
<a-button @click="runJob(3, 'close')">关闭</a-button>
|
|
||||||
</a-space>
|
</a-space>
|
||||||
<p></p>
|
<p></p>
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button @click="runJobByPool(4, 'run')">执行任务4</a-button>
|
<a-button @click="runJobByPool(4, 'run')">执行任务4</a-button>
|
||||||
进度:{{ progress4 }} , 进程pid:{{ progress4_pid }}
|
进度:{{ progress4 }} , 进程pid:{{ progress4_pid }}
|
||||||
<a-button @click="runJob(4, 'close')">关闭</a-button>
|
|
||||||
</a-space>
|
</a-space>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
49
main.js
49
main.js
@@ -1,5 +1,50 @@
|
|||||||
|
const { Application } = require('ee-core');
|
||||||
const EE = require('ee-core/ee');
|
const EE = require('ee-core/ee');
|
||||||
const App = require('./electron');
|
|
||||||
|
class Main 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();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* before app close
|
||||||
|
*/
|
||||||
|
async beforeClose () {
|
||||||
|
// do some things
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Instantiate an app object
|
// Instantiate an app object
|
||||||
EE.app = new App();
|
EE.app = new Main();
|
||||||
Reference in New Issue
Block a user