From 335c4f588525a02c4491415d16b9c97115cbb903 Mon Sep 17 00:00:00 2001 From: jingnen Date: Mon, 14 Feb 2022 15:13:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=97=A0=E8=BE=B9=E6=A1=86?= =?UTF-8?q?=E7=AA=97=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 1 + main.js | 3 ++- styles.css | 7 +++++++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 styles.css diff --git a/index.html b/index.html index d52d067..1e25ce0 100644 --- a/index.html +++ b/index.html @@ -5,6 +5,7 @@ Electron应用 + diff --git a/main.js b/main.js index 0dd8bb4..69d28a6 100644 --- a/main.js +++ b/main.js @@ -2,7 +2,7 @@ const { app, BrowserWindow, Menu, ipcMain} = require('electron'); const menu = require('./menu'); const path = require('path'); const tray = require('./tray'); -const notification = require('./notification'); +// const notification = require('./notification'); let iconPath = path.join(__dirname, 'public/favicon.ico'); let mainWindow = null; @@ -13,6 +13,7 @@ function createWindow () { height: 600, icon: iconPath, show: false, + frame: false, webPreferences: { nodeIntegration: true, contextIsolation: false diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..18fa258 --- /dev/null +++ b/styles.css @@ -0,0 +1,7 @@ +body { + -webkit-app-region: drag; +} + +button { + -webkit-app-region: no-drag; +} \ No newline at end of file -- GitLab