Browse Source

dev

master
nejery 5 years ago
parent
commit
6d669324d5
4 changed files with 6 additions and 5 deletions
  1. 1
    1
      main.js
  2. 2
    1
      package.json
  3. 3
    3
      renderer.js
  4. 0
    0
      test.txt

+ 1
- 1
main.js View File

@@ -28,7 +28,7 @@ function createWindow () {
28 28
     // in an array if your app supports multi windows, this is the time
29 29
     // when you should delete the corresponding element.
30 30
     mainWindow = null
31
-  })
31
+  });
32 32
   mainWindow.webContents.openDevTools()
33 33
 }
34 34
 

+ 2
- 1
package.json View File

@@ -4,7 +4,8 @@
4 4
   "description": "A minimal Electron application",
5 5
   "main": "main.js",
6 6
   "scripts": {
7
-    "start": "electron ."
7
+    "start": "electron .",
8
+    "package":"electron-packager . rikaze --platform=win32 --arch=x64 --icon=computer.ico --out=./out --asar --app-version=0.0.1 --overwrite --ignore=node_modules"
8 9
   },
9 10
   "repository": "https://github.com/electron/electron-quick-start",
10 11
   "keywords": [

+ 3
- 3
renderer.js View File

@@ -4,7 +4,7 @@
4 4
 // `nodeIntegration` is turned off. Use `preload.js` to
5 5
 // selectively enable features needed in the rendering
6 6
 // process.
7
-
8
-
9
-const { BrowserWindow } = require('electron');
7
+let myNotification = new Notification('标题', {
8
+    body: '通知正文内容'
9
+});
10 10
 

+ 0
- 0
test.txt View File


Loading…
Cancel
Save