升级electron egg脚手架版本

This commit is contained in:
2025-10-15 14:12:24 +08:00
parent ca8f173394
commit 081a77ac4c
54 changed files with 1756 additions and 1077 deletions

19
electron/main.js Normal file
View File

@@ -0,0 +1,19 @@
const { ElectronEgg } = require('ee-core');
const { Lifecycle } = require('./preload/lifecycle');
const { preload } = require('./preload');
// new app
const app = new ElectronEgg();
// register lifecycle
const life = new Lifecycle();
app.register("ready", life.ready);
app.register("electron-app-ready", life.electronAppReady);
app.register("window-ready", life.windowReady);
app.register("before-close", life.beforeClose);
// register preload
app.register("preload", preload);
// run
app.run();