25 lines
455 B
Markdown
25 lines
455 B
Markdown
# win系统弹窗
|
|
|
|
## install
|
|
```cmd
|
|
npm install --save node-notifier
|
|
```
|
|
|
|
|
|
## how2use
|
|
```js
|
|
const WindowsToaster = require('node-notifier').WindowsToaster // 弹框通知库
|
|
let notifier = new WindowsToaster({ // 配置SnoreToast
|
|
withFallback: false,
|
|
customPath: './snoretoast.exe'
|
|
});
|
|
|
|
notifier.notify({
|
|
title: '这是标题',
|
|
message: '这是内容!!',
|
|
icon: './cherry1.png'
|
|
},
|
|
function (error, response) {
|
|
console.log(response)
|
|
});
|
|
``` |