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

+ 2
- 1
package.json View File

4
   "description": "A minimal Electron application",
4
   "description": "A minimal Electron application",
5
   "main": "main.js",
5
   "main": "main.js",
6
   "scripts": {
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
   "repository": "https://github.com/electron/electron-quick-start",
10
   "repository": "https://github.com/electron/electron-quick-start",
10
   "keywords": [
11
   "keywords": [

+ 3
- 3
renderer.js View File

4
 // `nodeIntegration` is turned off. Use `preload.js` to
4
 // `nodeIntegration` is turned off. Use `preload.js` to
5
 // selectively enable features needed in the rendering
5
 // selectively enable features needed in the rendering
6
 // process.
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