nodebook/Miscellaneous/SnoreToast.md
2019-10-27 19:01:38 +08:00

455 B

win系统弹窗

install

npm install --save node-notifier

how2use

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)
});