✨Feat: 创建页面

This commit is contained in:
2025-10-30 08:37:45 +08:00
parent d3a562cd18
commit a9d982bb30
3 changed files with 35 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta
http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self'"
/>
<meta
http-equiv="X-Content-Security-Policy"
content="default-src 'self'; script-src 'self'"
/>
<title>Hello Wonder</title>
</head>
<body>
<h1>Hello Electron</h1>
<p>👋</p>
</body>
</html>
+14
View File
@@ -0,0 +1,14 @@
const { app, BrowserWindow } = require("electron");
const createWindow = () => {
const win = new BrowserWindow({
width: 800,
height: 600,
});
win.loadFile("index.html");
};
app.whenReady().then(() => {
createWindow();
});
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "electron",
"version": "1.0.0",
"description": "📖 An electron demo for study",
"main": "index.js",
"main": "main.js",
"scripts": {
"start": "electron .",
"test": "echo \"Error: no test specified\" && exit 1"